打包报错Unexpected character '#' (1:0)You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
啥情况!!!
啥情况!!!
2020-02-24
app.vue报错
原因:
css的id符号无法识别。需要css-loader进行解析
const path = require('path')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
module.exports = {
entry: path.join(__dirname,'src/index.js'),
output: {
filename: 'bundle.js',
path: path.join(__dirname,'dist')
},
plugins:[
new VueLoaderPlugin()
],
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.css$/,
loader: ['style-loader','css-loader']
}//加了css-loader
]
}
}
举报