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