为什么我输入了这段代码,还是报错You may need an appropriate loader to handle this file type
module: {
rules: [
{
test: /.vue$/,
loader: "vue-loader"
}
]
}
module: {
rules: [
{
test: /.vue$/,
loader: "vue-loader"
}
]
}
2018-12-03
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')}, module: { rules: [ { test: /\.vue$/,loader: 'vue-loader' }, { test: /\.css$/, use: [ "vue-style-loader", "css-loader" ]}] }, plugins: [new VueLoaderPlugin()] }
还要加上包
"vue-style-loader": "^4.1.2"
举报