title: vue-router not working after npm run build
body: <p>I have a vue project and I have installed it using vue cli. </p>
  
  <p>I have installed vue-router and all the routes works fine in npm run dev mode.</p>
  
  <p>The URL is <code>localhost:8000</code>. After that I run <code>npm run build</code> command, and navigate to the url <code>localhost/projet_name</code> this deploying blank page and no routes is working. </p>
  
  <p>I am using windows system and works on wampp server. </p>
  
  <p>If I want to run the project using <code>localhost/projet_name</code> what should I do?</p>
  
  <p>This is my folder structure after running the command <code>npm run build</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/HeoTG.png" rel="noreferrer">https://i.stack.imgur.com/HeoTG.png</a></p>
  
  <p><code>webpack.config.js</code> file is:</p>
  
  <pre><code>var path = require('path')
  var webpack = require('webpack')
  
  module.exports = {
    entry: './src/main.js',
    output: {
      path: path.resolve(__dirname, './dist'),
      publicPath: '/dist/',
      filename: 'build.js'
    },
    module: {
      rules: [
        {
          test: /\.css$/,
          use: [
            'vue-style-loader',
            'css-loader'
          ],
        },      {
          test: /\.vue$/,
          loader: 'vue-loader',
          options: {
            loaders: {
            }
            // other vue-loader options go here
          }
        },
        {
          test: /\.js$/,
          loader: 'babel-loader',
          exclude: /node_modules/
        },
        {
          test: /\.(png|jpg|gif|svg)$/,
          loader: 'file-loader',
          options: {
            name: '[name].[ext]?[hash]'
          }
        }
      ]
    },
    resolve: {
      alias: {
        'vue$': 'vue/dist/vue.esm.js'
      },
      extensions: ['*', '.js', '.vue', '.json']
    },
    devServer: {
      historyApiFallback: true,
      noInfo: true,
      overlay: true
    },
    performance: {
      hints: false
    },
    devtool: '#eval-source-map'
  }
  
  if (process.env.NODE_ENV === 'production') {
    module.exports.devtool = '#source-map'
    // http://vue-loader.vuejs.org/en/workflow/production.html
    module.exports.plugins = (module.exports.plugins || []).concat([
      new webpack.DefinePlugin({
        'process.env': {
          NODE_ENV: '"production"'
        }
      }),
      new webpack.optimize.UglifyJsPlugin({
        sourceMap: true,
        compress: {
          warnings: false
        }
      }),
      new webpack.LoaderOptionsPlugin({
        minimize: true
      })
    ])
  }
  </code></pre>
  
  <p>Packages.json file:</p>
  
  <pre><code>{
    "name": "posthere",
    "description": "A Vue.js project",
    "version": "1.0.0",
    "author": "Sandip",
    "license": "MIT",
    "private": true,
    "scripts": {
      "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
      "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
    },
    "dependencies": {
      "vue": "^2.5.11",
      "vue-resource": "^1.3.5",
      "vue-router": "^3.0.1"
    },
    "browserslist": [
      "&gt; 1%",
      "last 2 versions",
      "not ie &lt;= 8"
    ],
    "devDependencies": {
      "babel-core": "^6.26.0",
      "babel-loader": "^7.1.2",
      "babel-preset-env": "^1.6.0",
      "babel-preset-stage-3": "^6.24.1",
      "cross-env": "^5.0.5",
      "css-loader": "^0.28.7",
      "file-loader": "^1.1.4",
      "vue-loader": "^13.0.5",
      "vue-template-compiler": "^2.4.4",
      "webpack": "^3.6.0",
      "webpack-dev-server": "^2.9.1"
    }
  }
  </code></pre>