找不到要导入的文件或不可读的文件:@ material / elevation / mixins

时间:2019-04-03 11:51:49

标签: javascript bootstrap-4 material-design

继续收到此错误,但看不到有什么问题。我正在尝试在骑手中添加带有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' }
                ]
            }
        ]
    },
}];

0 个答案:

没有答案