默认webpack无法打包.vue文件,需要安装相关Loader
安装 npm install vue-loader vue-template-compiler -D

webpack.config.js配置

1. const VueLoaderPlugin = require('vue-loader/lib/plugin'); 

2.在plugins数组内,

new VueLoaderPlugin()

3.rules 配置

{test:/\.vue$/,use:'vue-loader'}

render加载vue文件 vue-loader配置

相关文章:

  • 2021-11-19
  • 2021-12-16
  • 2022-01-15
  • 2021-04-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案