https://github.com/linzhi-linzhi/webpack-vue
npm i vue
import {createApp } from 'vue'
import App from './App.vue'
createApp(App).mount('#app')
plugins:[
new HtmlWebpackPlugin({
template: 'public/index.html',
inject: 'body',
hash: false
}),
],
npm install vue-loader@next@vue/compiler-sfc
rules: [
{
test: /\.vue$/,
use: {
loader: 'vue-loader'
}
},
]
const{VueLoaderPlugin}=require('vue-loader')
plugins:[newVueLoaderPlugin()],
网友评论