Vue-router always returning to error route - on production build

时间:2018-04-18 17:52:21

标签: vuejs2 vue-router

I have created a app with vue cli. It dev build its working fine with all the routes it has. But when i do production build its always returning to the error route. enter image description here

In console it's showing this error:

GET http://localhost/ndvc/dist/build/build.js net::ERR_ABORTED

Here is the config/index.js file

   var path = require('path')
   module.exports = {
   build: {
     env: require('./prod.env'),
     index: path.resolve(__dirname, '../dist/index.html'),
     assetsRoot: path.resolve(__dirname, '../dist'),
     assetsSubDirectory: 'static',
     assetsPublicPath: '',
     productionSourceMap: false,
     productionGzip: false,
     productionGzipExtensions: ['js', 'css'],
     bundleAnalyzerReport: process.env.npm_config_report
  },
  dev: {
    env: require('./dev.env'),
    port: 8080,
    autoOpenBrowser: true,
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    proxyTable: {},
    cssSourceMap: false
  }
}

0 个答案:

没有答案