From 5ced396fa34ab3d493094ef8e1f17fd1df5a58be Mon Sep 17 00:00:00 2001 From: GanNing Date: Sun, 25 Jun 2017 14:00:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E5=B8=83=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E8=B5=84=E6=BA=90=E7=9B=AE=E5=BD=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: GanNing --- config/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/index.js b/config/index.js index 9178385b..bf8b95c9 100644 --- a/config/index.js +++ b/config/index.js @@ -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.