按照老师的来出错了
ERROR in ./src/app.vue?vue&type=style&index=0&lang=css Module parse failed: Unexpected character '#' (19:0) You may need an appropriate loader to handle this file type. | | | #test{ | color:red; | } @ ./src/app.vue 4:0-62出错了了
ERROR in ./src/app.vue?vue&type=style&index=0&lang=css Module parse failed: Unexpected character '#' (19:0) You may need an appropriate loader to handle this file type. | | | #test{ | color:red; | } @ ./src/app.vue 4:0-62出错了了
2018-05-09
其实不按照老师的也可以,你这个是缺少了css-loader,改成以下这样既可运行:
const Path=require('path');
const {VueLoaderPlugin}=require('vue-loader')
module.exports={
mode:'development',
entry:Path.join(__dirname,"src/index.js"),
output:{
filename:"bundle.js",
path:Path.join(__dirname,"dist")
},
module:{
rules:[
{
test:/\.vue$/,
loader:"vue-loader",
exclude:/node_modules/
},
{
test:/\.css$/,
use:[
'vue-style-loader',
'css-loader'
]
}]
},
plugins:[
new VueLoaderPlugin()
]
}
举报