提交 27fd7af0 authored 作者: vipcxj's avatar vipcxj

code clean

上级 d22c8c31
const proxy = { const proxy = {
"target": "http://192.168.1.22:8080", target: "http://192.168.1.22:8080",
"changeOrigin": true, changeOrigin: true,
"pathRewrite": { pathRewrite: {
"^/api": "/bm/api" "^/api": "/bm/api"
} }
}; };
const resource_proxy = { const resource_proxy = {
"target": "http://192.168.1.22:8080", target: "http://192.168.1.22:8080",
"changeOrigin": true, changeOrigin: true,
"pathRewrite": { pathRewrite: {
"^/resource": "/bm/resource" "^/resource": "/bm/resource"
} }
}; };
module.exports = { module.exports = {
"entry": "src/index.js", entry: "src/index.js",
"html": { html: {
"template": "src/index.ejs", template: "src/index.ejs",
}, },
"theme": { theme: {
"layout-header-height": "48px", "layout-header-height": "48px",
"layout-header-background": "#fff", "layout-header-background": "#fff",
"layout-footer-background": "#fff", "layout-footer-background": "#fff",
...@@ -27,31 +27,31 @@ module.exports = { ...@@ -27,31 +27,31 @@ module.exports = {
'menu-dark-bg': '#404040', 'menu-dark-bg': '#404040',
"layout-header-padding": "0", "layout-header-padding": "0",
}, },
"ignoreMomentLocale": true, ignoreMomentLocale: true,
"hash": true, hash: true,
"env": { env: {
"development": { development: {
publicPath: "/", publicPath: "/",
"extraBabelPlugins": [ extraBabelPlugins: [
"dva-hmr", "dva-hmr",
["import", { "libraryName": "antd", "style": true }] ["import", { "libraryName": "antd", "style": true }]
], ],
"devtool": "cheap-module-eval-source-map", devtool: "cheap-module-eval-source-map",
"proxy": { proxy: {
"/api": proxy, "/api": proxy,
"/resource": resource_proxy, "/resource": resource_proxy,
} }
}, },
"production": { production: {
publicPath: "/bm/", publicPath: "/bm/",
define: { define: {
contextPath: "/bm", contextPath: "/bm",
apiContextPath: "/bm" apiContextPath: "/bm"
}, },
"extraBabelPlugins": [ extraBabelPlugins: [
["import", { "libraryName": "antd", "style": true }] ["import", { "libraryName": "antd", "style": true }]
], ],
"devtool": "hidden-source-map" devtool: "hidden-source-map"
} }
} }
}; };
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论