The input CSS file is in the assets tree, called (by default) style.css. Tailwind compiles this to a CSS file in the output directory, also called style.css. When running Lektor in server mode, if the input style.css is edited, Lektor naturally copies the updated asset to the output directory. The problem is that this overwrites the compiled Tailwind output file of the same name.
Here is a fix. It's a little kludgy — it monkey-patches Lektor's build program for the CSS file to prevent it from copying the input CSS — but it works for me.
First off,
lektor-tailwind
is great! Thank you!One issue I've stumbled across:
The input CSS file is in the
assets
tree, called (by default)style.css
. Tailwind compiles this to a CSS file in the output directory, also calledstyle.css
. When running Lektor in server mode, if the inputstyle.css
is edited, Lektor naturally copies the updated asset to the output directory. The problem is that this overwrites the compiled Tailwind output file of the same name.Here is a fix. It's a little kludgy — it monkey-patches Lektor's build program for the CSS file to prevent it from copying the input CSS — but it works for me.