I use yarn with my rail 5.1 app (and not webpacker, just the default asset pipeline).
Running a local server in a development environment, I have no problems with my assets.
But as soon as I recompile my assets (the environment does not matter) or let Heroku pack my assets, all the stylesheets (from node modules) that I imported from my file application.sassno longer work.
The reason for this behavior is that sass compiles all the files into a single output file, but for some reason, it apparently skips the statements @importthat include the node modules and downloads these files separately.
So this is:
@import "components/index.sass"
@import "nodemodule/nodemodule.css"
This will compile during development:
// content of "components/index.sass"
// content of "nodemodule/nodemodule.css"
and to this in the production process:
// content of "components/index.sass"
@import "nodemodule/nodemodule.css"
node_module/nodemodule.css , . Javascript .