提交 60f33568 authored 作者: vipcxj's avatar vipcxj

fix:修复导致生产环境的路径相关问题

上级 d5118b12
...@@ -24,10 +24,6 @@ module.exports = { ...@@ -24,10 +24,6 @@ module.exports = {
'menu-dark-bg': '#404040', 'menu-dark-bg': '#404040',
"layout-header-padding": "0", "layout-header-padding": "0",
}, },
publicPath: "/bm",
define: {
contextPath: "/bm"
},
"env": { "env": {
"development": { "development": {
"extraBabelPlugins": [ "extraBabelPlugins": [
...@@ -48,6 +44,10 @@ module.exports = { ...@@ -48,6 +44,10 @@ module.exports = {
} }
}, },
"production": { "production": {
publicPath: "/bm/",
define: {
contextPath: "/bm"
},
"extraBabelPlugins": [ "extraBabelPlugins": [
"transform-runtime", "transform-runtime",
["import", { "libraryName": "antd", "style": true }] ["import", { "libraryName": "antd", "style": true }]
......
...@@ -113,7 +113,7 @@ function RouterConfig({ history, app }) { ...@@ -113,7 +113,7 @@ function RouterConfig({ history, app }) {
require.ensure([], (require) => { require.ensure([], (require) => {
registerModel(app, require('./models/login')); registerModel(app, require('./models/login'));
cb(null, require('./routes/login')); cb(null, require('./routes/login'));
}, '/login'); }, 'login');
}, },
}, },
{ {
...@@ -123,7 +123,7 @@ function RouterConfig({ history, app }) { ...@@ -123,7 +123,7 @@ function RouterConfig({ history, app }) {
require.ensure([], (require) => { require.ensure([], (require) => {
registerModel(app, require('./models/domain')); registerModel(app, require('./models/domain'));
cb(null, require('./routes/domain')); cb(null, require('./routes/domain'));
}, '/domain'); }, 'domain');
}, },
}, },
{ {
...@@ -133,7 +133,7 @@ function RouterConfig({ history, app }) { ...@@ -133,7 +133,7 @@ function RouterConfig({ history, app }) {
require.ensure([], (require) => { require.ensure([], (require) => {
registerModel(app, require('./models/main')); registerModel(app, require('./models/main'));
cb(null, require('./routes/main')); cb(null, require('./routes/main'));
}, '/main'); }, 'main');
}, },
getChildRoutes: (nextState, cb) => { getChildRoutes: (nextState, cb) => {
getMenus() getMenus()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论