Closed sync closed 4 years ago
Can you send me your bsconfig.json
and/or send me a GH repo that I can use to reproduce? I might need to circle back on the generator logic, so it might be best to remove it for now.
{
"name": "meet-app",
"sources": [
{
"dir": "src",
"subdirs": true,
"generators": [
{
"name": "gen-tailwind",
"edge": ["tailwind.css", ":", "main.css"]
}
]
}
],
"generators": [
{
"name": "gen-tailwind",
"command": "tailwindcss build $in -o $out"
}
],
"bs-dependencies": [
"reason-react",
"re-classnames",
"reason-relay",
"bs-fetch",
"decco",
"reason-promise",
"bs-webapi",
"re-classnames"
],
"ppx-flags": [
"reason-relay/ppx",
"bs-let/ppx",
"decco/ppx",
["@dylanirlbeck/tailwind-ppx/tailwind-ppx", "-path ./src/tailwind.css"]
],
"reason": { "react-jsx": 3 },
"package-specs": {
"module": "es6",
"in-source": true
},
"suffix": ".bs.js",
"bsc-flags": ["-bs-super-errors", "-bs-no-version-header"],
"refmt": 3,
"warnings": {
"error": "+101"
}
}
So I did some investigation, and added the generator definition to the demo project. This seems to be an unavoidable issue with how the generator works --- I think your best bet is to separate our the clean and build/watch steps so you're not cleaning the project each time (if you're doing this already).
I'll close this for now, though maybe someone will have a better solution in the future, in which case I'll thread below.
If i run a bsb clean before running build, bsb will remove the tailwind.css file and then when i run build it fail to compile saying the tailwind.css file is missing. At the end of this process (even with a build failure) the generator will generate the tailwind.css file. Next time i run bsb build it compiles properly.