vue腳手架創建,直接修改app.vue報錯


error  in ./src/App.vue

Module Error (from ./node_modules/eslint-loader/index.js):

E:\html\html\html\vue\vuex_demo1\src\App.vue
  10:7  error  Missing space before function parentheses  space-before-function-paren
  10:9  error  Missing space before opening brace         space-before-blocks
  12:1  error  Trailing spaces not allowed                no-trailing-spaces

✖ 3 problems (3 errors, 0 warnings)
  3 errors and 0 warnings potentially fixable with the `--fix` option.

解決辦法 安裝vue_loader

創建webpack.config.js 寫入以下

const VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
    plugins: [ //配置插件的節點,所有插件都要在這里配置
        new VueLoaderPlugin()
    ],
    module: {
        rules: [
            { test: /\.vue$/, loader: 'vue-loader' }
        ]
    }
};

后續還是有問題 創建vue.config.js 寫入

module.exports = {
    lintOnSave: false
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM