解决TypeErrorCannot read property ‘vue‘ of undefined问题

解决TypeError:Cannot read property ‘vue’ of undefined问题

1.安装npm install和vue-template-compiler

npm install vue-loader@latest --save-dev

2.安装插件到webpack.config.js文件中

在第一个添加

const {
    
     VueLoaderPlugin } = require('vue-loader')

在module中添加

	  plugins: [
	    new VueLoaderPlugin()
	  ]

3.重新安装依赖

npm install

Guess you like

Origin blog.csdn.net/qq_44255146/article/details/115379285