Skip to content

Commit

Permalink
Fix first build not having any CSS
Browse files Browse the repository at this point in the history
Tailwind is able to pick up changes faster since it doesn't need to wait
for JS to be transpiled. But most importantly is the improved developer
experience, avoiding a website without CSS the first time `npm run dev`
is run.
  • Loading branch information
jacobemcken committed Jan 12, 2023
1 parent 71e8296 commit d44a771
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tailwind.config.js
@@ -1,8 +1,9 @@
const defaultTheme = require('tailwindcss/defaultTheme')

module.exports = {
// in prod look at shadow-cljs output file in dev look at runtime, which will change files that are actually compiled; postcss watch should be a whole lot faster
content: process.env.NODE_ENV == 'production' ? ["./public/js/main.js"] : ["./public/js/cljs-runtime/*.js"],
content: [
"./src/main/**/*.cljs"
],
theme: {
extend: {
fontFamily: {
Expand Down

0 comments on commit d44a771

Please sign in to comment.