I'm using the Drupal module called webpack
for my Drupal 9 project. Everything is working pretty good, but I'm getting errors because of my .scss
files.
ERROR in ../components/src/component-blocks/Banner/Banner.core.module.scss 3:14
Module parse failed: Unexpected token (3:14)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
I'm currently building my JS files with drush webpack:build
I can see that running the above command seems to run the following which I see in the error log:
/drupal/node_modules/.bin/webpack --config /private/tmp/webpack.config.js
I don't see anything in the documentation that would allow me to supply my own webpack.config.js
. I'm not the most familiar with Webpack. Is there a way I can just add my own rule and drush webpack:build
will automatically pick it up?