ERROR in ./src/app.vue?vue&type=template&id=5ef48958& Module parse failed: Unexpected token (2:0) You may need an appropriate loader to handle this file type.


ERROR in ./src/app.vue?vue&type=template&id=5ef48958&
Module parse failed: Unexpected token (2:0)
You may need an appropriate loader to handle this file type.
|
| <div>
| <h1>我的世界</h1>
| </div>
@ ./src/app.vue 1:0-82
@ ./src/main.es

ERROR in ./src/app.vue
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
@ ./src/main.es 7:11-31

Vue-loader在15.*之后的版本都是 vue-loader的使用都是需要伴生 VueLoaderPlugin的

We are in the process of upgrading Vue CLI 3 beta to use webpack 4 + Vue Loader v15, so you might want to wait if you are planning to upgrade to Vue CLI 3.

const VueLoaderPlugin = require('vue-loader/lib/plugin');
plugins: [
  new HtmlWebpackPlugin({
  template: "./index.html",
  filename: "../views/mobile.html",
  hash: true,
  inject: true
  }),
  new VueLoaderPlugin()
]

 https://vue-loader.vuejs.org/migrating.html#notable-breaking-changes


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM