浏览代码

Allow custom Tailwind content (#1399)

Kabir Goel 1 年之前
父节点
当前提交
278b9ab7e2
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      reflex/app.py

+ 4 - 6
reflex/app.py

@@ -503,13 +503,11 @@ class App(Base):
         compile_results.append(compiler.compile_theme(self.style))
 
         # Compile the Tailwind config.
-        compile_results.append(
-            compiler.compile_tailwind(
-                dict(**config.tailwind, content=constants.TAILWIND_CONTENT)
-                if config.tailwind is not None
-                else {}
+        if config.tailwind is not None:
+            config.tailwind["content"] = config.tailwind.get(
+                "content", constants.TAILWIND_CONTENT
             )
-        )
+            compile_results.append(compiler.compile_tailwind(config.tailwind))
 
         # Write the pages at the end to trigger the NextJS hot reload only once.
         thread_pool = ThreadPool()