{ test: /\.scss/,
loader: 'style-loader!css-loader!postcss-loader!sass-loader?outputStyle=expanded'},
module.exports = {
srcPath: srcPath,
publicPath: '/assets/',
port: dfltPort,
getDefaultModules: getDefaultModules,
postcss: function () {
return [
require('autoprefixer')({
browsers: ['last 2 versions', 'ie >= 8']
})
];
}
};
webpack 配置 postcss 如果遇到下面的问题:
ERROR in ENOENT: no such file or directory, scandir '/Users/chengzehe/Desktop/github/own-project/startReact/node_modules/node-sass/vendor'
@ ./src/styles/App.scss 4:14-186 13:2-17:4 14:20-192
webpack: bundle is now VALID.
请直接 npm rebuild node-sass