修复history模式 生产环境下资源目录异常
Signed-off-by: GanNing <gycm520@gmail.com>
This commit is contained in:
parent
f1aa01a233
commit
c1c06064b7
|
@ -8,8 +8,8 @@ module.exports = {
|
||||||
index: path.resolve(__dirname, '../dist/index.html'),
|
index: path.resolve(__dirname, '../dist/index.html'),
|
||||||
assetsRoot: path.resolve(__dirname, '../dist'),
|
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||||
assetsSubDirectory: '',
|
assetsSubDirectory: '',
|
||||||
assetsPublicPath: './', //生产环境assetsPublicPath: '/'
|
assetsPublicPath: process.env.NODE_ENV === 'production' ? '/' : './', //生产环境assetsPublicPath: '/'
|
||||||
staticPath:'./', //生产环境 staticPath:''
|
staticPath:process.env.NODE_ENV === 'production' ? '/' : './', //生产环境 staticPath:''
|
||||||
productionSourceMap: true,
|
productionSourceMap: true,
|
||||||
// Gzip off by default as many popular static hosts such as
|
// Gzip off by default as many popular static hosts such as
|
||||||
// Surge or Netlify already gzip all static assets for you.
|
// Surge or Netlify already gzip all static assets for you.
|
||||||
|
|
Loading…
Reference in New Issue