在使用webpack@3.8.1使用内联方式打包css时报错了。
看到的文档如下图
我的代码
entry.js
import Mystyle from 'style-loader!css-loader?modules!./src/style.css';
document.write('Hello Webpack');
webpack.config.js
var webpack = require('webpack');
module.exports = {
entry: {
entry: './src/entry.js',
// style: './src/style.css'
},
output: {
path: __dirname + '/dist',
filename: 'boudle.js'
}
}
打包时就报错了
使用配置方式就没问题
求大神帮忙指点下
你检查下路径吧,提示是路径错了,文件没找到,跟配置应该没关系。