zoukankan      html  css  js  c++  java
  • 从github下载的vue项目启动宝Cannot Get错误

    从github下载的vue项目启动宝Cannot Get错误,网上参考出现该错误来源很多,这里先总结遇到的第一个解决方法。

    参考地址:

    https://www.cnblogs.com/anns/p/7457952.html

    代码修改如下:

    在config-》index.js中修改 assetsPublicPath: '/', 为 assetsPublicPath: './', 再执行 npm run dev ,问题解决

     build: {
            env: require('./prod.env'),
            index: path.resolve(__dirname, '../dist/modules/index/index.html'),
            phone: path.resolve(__dirname, '../dist/modules/phone/phone.html'),
            assetsRoot: path.resolve(__dirname, '../dist'),
            assetsSubDirectory: 'static',
            assetsPublicPath: './',
            productionSourceMap: true,
            // Gzip off by default as many popular static hosts such as
            // Surge or Netlify already gzip all static assets for you.
            // Before setting to `true`, make sure to:
            // npm install --save-dev compression-webpack-plugin
            productionGzip: false,
            productionGzipExtensions: ['js', 'css'],
            bundleAnalyzerReport: process.env.npm_config_report
        },

    注意,不能更改dev下的代码。

    附上下来项目的来源:

    https://github.com/chen1218chen/vue-cli-multi-page

  • 相关阅读:
    Java——数组
    Java——控制循环结构
    脏检查
    Session跟SessionFactory的线程安全与非安全
    脏检查and刷新机构
    oracle函数
    多线程下单列模式
    多线程
    线程同步
    文件上传功能的实现
  • 原文地址:https://www.cnblogs.com/yangyuke1994/p/9413254.html
Copyright © 2011-2022 走看看