Allow custom Tailwind content (#1399)

This commit is contained in:
Kabir Goel 2023-07-21 11:47:06 -07:00 committed by GitHub
parent 6f5ac6ace2
commit 278b9ab7e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()