修复发布环境资源目录错误

Signed-off-by: GanNing <gycm520@gmail.com>
This commit is contained in:
GanNing 2017-06-25 14:00:43 +08:00
parent f1aa01a233
commit 5ced396fa3
1 changed files with 2 additions and 2 deletions

View File

@ -8,8 +8,8 @@ module.exports = {
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: '',
assetsPublicPath: './', //生产环境assetsPublicPath: '/'
staticPath:'./', //生产环境 staticPath:''
assetsPublicPath: process.env.NODE_ENV === 'production' ? '/' : './', //生产环境assetsPublicPath: '/'
staticPath:process.env.NODE_ENV === 'production' ? '' : './', //生产环境 staticPath:''
productionSourceMap: true,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.