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

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

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