javascript - 找不到或无法读取要导入的文件:@material/elevation/mixins
问题描述
不断收到此错误,但看不到有什么问题。我正在尝试在骑手中添加带有 webpack 的引导材料设计。Bin 在网上寻找,但找不到解决方案。
这是 app.cscc 类
@import "~@material/button/mdc-button";
.foo-button {
@include mdc-button-ink-color(teal);
@include mdc-states(teal);
}
body {
color: blue;
}
这是 webpack.config.js
const autoprefixer = require('autoprefixer');
const path = require('path');
module.exports = [{
entry: './app.scss',
output: {
// This is necessary for webpack to compile
// But we never use style-bundle.js
filename: 'style-bundle.js',
},
module: {
rules: [
{
test: /\.scss$/,
use: [
{
loader: 'sass-loader',
options: {
name: 'bundle.css',
includePaths: path.resolve(__dirname, '../node_modules')
//includePaths: ['./node_modules']
},
},
{ loader: 'extract-loader' },
{ loader: 'css-loader' },
{
loader: 'postcss-loader',
options: {
plugins: () => [autoprefixer()]
}
},
{ loader: 'sass-loader' }
]
}
]
},
}];
解决方案
推荐阅读
- php - 尝试执行以下命令 shell_exec("sudo /usr/bin/nmap -n -sn ".$_SERVER['REMOTE_ADDR']) 但它返回 NULL
- oracle - oracle 12c 使用 puppet 自动安装返回错误,但手动运行时正常
- c - 从 C 程序构建新的二进制文件
- c# - MOQ 单元测试错误。预期在模拟上调用一次,但为 0 次
- python - 字符串到 int ValueError Python
- linux - 标准输出中如何管理内存?
- java - 在 Android 中使用 Room 和 RxJava 链接多个网络调用和数据库插入
- java - 创建没有旋转元数据的旋转pdf文件
- javascript - Firebase 当前用户更新电话号码
- java - 如何将本机查询结果映射到自定义类对象?