always include tailwindcss/postcss
This commit is contained in:
parent
6d4b4bc17c
commit
620c2b3379
@ -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):
|
||||
|
@ -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():
|
||||
|
@ -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",
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user