我安装了一个插件,并使用一个从scss到css的编译器运行。在我将几个文件移动到更好的结构中后,在构建块时突然出现了以下错误:
ERROR in ./blocks/random-game/src/style.scss 8:1
Module parse failed: Unexpected token (8:1)
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
| */
|
> .wp-block-random-game {
|
| }
@ ./blocks/random-game/src/index.js 15:0-22
我不明白为什么会发生这种情况,以及我必须在哪里添加加载程序。我从创建块脚本开始,并从那里构建插件。其他一切正常:
[./blocks/random-game/src/edit.js] 1.45 KiB {index} [built]
[./blocks/random-game/src/index.js] 983 bytes {index} [built]
[./blocks/random-game/src/save.js] 487 bytes {index} [built]
[./blocks/random-game/src/style.scss] 277 bytes {index} [built] [failed] [1 error]
知道我可以在哪里添加加载器吗?