Bladeren bron

always include tailwindcss/postcss

Khaleel Al-Adhami 3 maanden geleden
bovenliggende
commit
620c2b3379
3 gewijzigde bestanden met toevoegingen van 1 en 23 verwijderingen
  1. 0 2
      reflex/app.py
  2. 0 19
      reflex/compiler/compiler.py
  3. 1 2
      reflex/constants/installer.py

+ 0 - 2
reflex/app.py

@@ -1134,8 +1134,6 @@ class App(MiddlewareMixin, LifespanMixin):
                     "content", constants.Tailwind.CONTENT
                 )
                 _submit_work(compiler.compile_tailwind, config.tailwind)
-            else:
-                _submit_work(compiler.remove_tailwind_from_postcss)
 
             # Wait for all compilation tasks to complete.
             for future in concurrent.futures.as_completed(result_futures):

+ 0 - 19
reflex/compiler/compiler.py

@@ -514,25 +514,6 @@ def compile_tailwind(
     return output_path, code
 
 
-def remove_tailwind_from_postcss() -> tuple[str, str]:
-    """If tailwind is not to be used, remove it from postcss.config.js.
-
-    Returns:
-        The path and code of the compiled postcss.config.js.
-    """
-    # Get the path for the output file.
-    output_path = str(get_web_dir() / constants.Dirs.POSTCSS_JS)
-
-    code = [
-        line
-        for line in Path(output_path).read_text().splitlines(keepends=True)
-        if "@tailwindcss" not in line
-    ]
-
-    # Compile the config.
-    return output_path, "".join(code)
-
-
 def purge_web_pages_dir():
     """Empty out .web/pages directory."""
     if not is_prod_mode() and environment.REFLEX_PERSIST_WEB_DIR.get():

+ 1 - 2
reflex/constants/installer.py

@@ -192,7 +192,6 @@ class PackageJson(SimpleNamespace):
         "universal-cookie": "7.2.2",
     }
     DEV_DEPENDENCIES = {
-        "autoprefixer": "10.4.20",
+        "@tailwindcss/postcss": "4.0.4",
         "postcss": "8.5.1",
-        "postcss-import": "16.1.0",
     }