zoukankan      html  css  js  c++  java
  • You are using the runtime-only build of Vue where the template compiler is not available.

    使用vue-cli搭建的项目,启动报错

    You are using the runtime-only build of Vue where the template compiler is not available.

    解决方法

    在vue.config.js文件中配置

    const path = require("path");
    
    module.exports = {
      // webpack配置 - 简单配置方式
      configureWebpack: {
        resolve: {
          alias: {
            // 别名
            vue$: "vue/dist/vue.esm.js", //加上这一句
            "@api": path.resolve(__dirname, "./src/api"),
            "@utils": path.resolve(__dirname, "./src/utils")
          }
        }
      },
      chainWebpack: config => {
        // GraphQL Loader
        config.module
          .rule('html')
          .test(/.html$/)
          .use('html-loader')
          .loader('html-loader')
          .tap(options => {
            return options;
          });
      }
    }

    再次启动就OK了

  • 相关阅读:
    Codeforces 798C
    Codeforces 777E
    Codeforces 801C Voltage Keepsake(二分枚举+浮点(模板))
    【NOIP 2017】宝藏
    利普希茨
    【NOIP2008】双栈排序
    捕老鼠
    失格
    【JZOJ4307】喝喝喝
    Blocks
  • 原文地址:https://www.cnblogs.com/steamed-twisted-roll/p/11796480.html
Copyright © 2011-2022 走看看