因为.vue的引入没有后缀名,自己加上
module.exports = {
entry: './src/main.js',
output: {
filename: "./js/bundle.js"
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.js' // 用 webpack 1 时需用 'vue/dist/vue.common.js'
},
extensions: ['*', '.js', '.vue']
}
}
2023-12-01 08:58:03
因为.vue的引入没有后缀名,自己加上
module.exports = {
entry: './src/main.js',
output: {
filename: "./js/bundle.js"
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.js' // 用 webpack 1 时需用 'vue/dist/vue.common.js'
},
extensions: ['*', '.js', '.vue']
}
}