New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsbundling with esbuild generated application.css that override the one from cssbundling with sass #45
Comments
Could be mitigated by changing the default from the generator. I had this problem with tailwind but just switched to running tailwind via PostCSS so I completely uninstalled PostCSS so there's only 1 emit now. I like the idea of emitting |
I don't think I understand what the problem is? |
If you have CSS in your JS, ESbuild will emit an application.css with the default install from Not a problem with this gem so much as a possible point of confusion when using both gems together. Pretty sure that will be common in Rails 7. Perhaps using a different default from install would be a viable solution. It seems to generate Again this is a pure quality of life issue with the generator and not something that needs to be fixed but it could help with developer UX. |
I've experienced this as well. As a work around I renamed my esbuild target file to 'application-esbuild.js' so that there wasn't an overlap. This wasn't an obvious fix so some type of alternative solution or documentation would be nice. |
Documented this for now: 928868e |
Hi,
I used jsbundling with esbuild. At the install rake task, it shows me a "build" command to put to package.json.
Then, I used cssbundling with sass and it also give me a "build:css" run string that should be put to package.json.
It means that I have "build" and "build:css" script run strings in package.json. I used the default ones that was displayed by install step.
Then, I realized that both run strings generate application.css inside app build. If I edit a scss file, then application.css was generated by "build:css". But if I edit a "js" file, then application.css was generated by "build". I don't know that esbuild could generate a css.
Then, I change the runstring of "build:css" to generate another filename and it works fine together.
I think that we may include this in readme or a doc.
Thanks,
The text was updated successfully, but these errors were encountered: