提交 3ab19bf0 authored 作者: vipcxj's avatar vipcxj

improve: 添加contextPath环境变量,以利于生产环境部署

上级 fd9cfba8
...@@ -24,6 +24,10 @@ module.exports = { ...@@ -24,6 +24,10 @@ module.exports = {
'menu-dark-bg': '#404040', 'menu-dark-bg': '#404040',
"layout-header-padding": "0", "layout-header-padding": "0",
}, },
publicPath: "/bg",
define: {
contextPath: "bg"
},
"env": { "env": {
"development": { "development": {
"extraBabelPlugins": [ "extraBabelPlugins": [
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
"babel-register": "^6.24.1", "babel-register": "^6.24.1",
"chai": "^4.0.2", "chai": "^4.0.2",
"cross-env": "^5.0.1", "cross-env": "^5.0.1",
"ejs-loader": "^0.3.0",
"enzyme": "^2.9.1", "enzyme": "^2.9.1",
"eslint": "^3.12.2", "eslint": "^3.12.2",
"eslint-config-airbnb": "^13.0.0", "eslint-config-airbnb": "^13.0.0",
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dva Demo</title> <title>Dva Demo</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script> <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<link rel="stylesheet" href="/index.css" /> <!--<link rel="stylesheet" href="/index.css" />-->
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script src="/index.js"></script> <!--<script src="/index.js"></script>-->
</body> </body>
</html> </html>
/* eslint-disable no-undef */
/** /**
* Created by yaohx_169 on 2017/6/6. * Created by yaohx_169 on 2017/6/6.
*/ */
...@@ -37,7 +38,7 @@ const config = { ...@@ -37,7 +38,7 @@ const config = {
name: 'Jbpm Demo', name: 'Jbpm Demo',
footerText: '上海铂蓝信息科技有限公司', footerText: '上海铂蓝信息科技有限公司',
logo: '/logo.png', logo: '/logo.png',
contextPath: '', contextPath: process.env.NODE_ENV === 'development' ? '' : contextPath,
defaultDateFormat, defaultDateFormat,
defaultTimeFormat, defaultTimeFormat,
defaultDateTimeFormat, defaultDateTimeFormat,
......
module.exports = function (config) {
config.module.rules.push({
test: /\.ejs$/,
loader: 'ejs-loader',
});
return config;
};
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论