Currently, I import scss files like this:
@import './node_modules/bulma/bulma';
However, in Laravel Mix I learned that I could just import the files like this, without specifying ./node_modules
:
@import '~bulma/bulma';
Anyway I could do this in ParcelJS?
The sass-loader in webpack uses node-sass' custom importer feature to pass all queries to the webpack resolving engine.
But In parcel-bundler,
The node_modules resolution algorithm isn't implemented yet for SASS/SCSS. Currently you could make a .sassrc or .sassrc.js file to configure the node-sass includePaths option to include node_modules.
current workaround is found in this discussion
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With