具有自定义配置的 Drupal Webpack 模块?

问题描述

我正在将名为 webpack 的 Drupal 模块用于我的 Drupal 9 项目。一切运行良好,但由于我的 .scss 文件而出现错误

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

我目前正在使用 drush webpack:build

构建我的 JS 文件

我可以看到运行上面的命令似乎运行了我在错误日志中看到的以下内容

/drupal/node_modules/.bin/webpack --config /private/tmp/webpack.config.js

我在文档中没有看到任何内容允许我提供我自己的 webpack.config.js。我不是最熟悉 Webpack 的人。有没有一种方法可以让我添加自己的规则,然后 drush webpack:build自动选取它?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)