You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In relation to the question and answer in the readme:
Why does esbuild overwrite my application.css?
If you import CSS in your application.js while using esbuild, you'll be creating both an app/assets/builds/application.js and app/assets/builds/application.css file when bundling. The latter can conflict with the app/assets/builds/application.css produced by cssbundling-rails. The solution is to either change the output file for esbuild (and the references for that) or for cssbundling. Both are specified in package.json.
I changed the line in my package.json to "build:css": "sass ./app/assets/stylesheets/application.sass.scss ./app/assets/builds/application-styles.css --no-source-map --load-path=node_modules" but I expected to have to update my stylesheet_link_tag line in my layout and I also expected a file in app/assets/builds called application-style.css, but I don;t get that file and I didn't have to update my view.
Why does this work? Please could someone explain a little further to help me understand.
This discussion was converted from issue #61 on January 13, 2022 09:49.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
In relation to the question and answer in the readme:
I changed the line in my
package.json
to"build:css": "sass ./app/assets/stylesheets/application.sass.scss ./app/assets/builds/application-styles.css --no-source-map --load-path=node_modules"
but I expected to have to update mystylesheet_link_tag
line in my layout and I also expected a file inapp/assets/builds
calledapplication-style.css
, but I don;t get that file and I didn't have to update my view.Why does this work? Please could someone explain a little further to help me understand.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions