Created
February 3, 2021 02:30
-
-
Save stefango/2000e2a574d6428c3422fd7cc924889f to your computer and use it in GitHub Desktop.
roadhog config example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// const API = 'http://127.0.0.1:8080'; | |
const API = 'http://192.168.0.107:8080'; | |
export default { | |
entry: "./src/index.js", | |
disableCSSModules: true, | |
outputPath: "../../../spa/cube1", | |
library: "weaCube", | |
libraryTarget: "umd", | |
theme: { | |
"@primary-color": "#2db7f5" | |
}, | |
devtool: "sourcemap", | |
env: { | |
"development": { | |
"extraBabelPlugins": [ | |
"transform-decorators-legacy", | |
"dva-hmr", | |
"transform-runtime" | |
] | |
}, | |
"production": { | |
"extraBabelPlugins": [ | |
"transform-decorators-legacy", | |
"transform-runtime" | |
] | |
} | |
}, | |
externals: [ | |
{ | |
"react": "React" | |
}, | |
{ | |
"react-dom": "ReactDOM" | |
}, | |
{ | |
"antd": "antd" | |
}, | |
{ | |
"jquery": "jQuery" | |
}, | |
{ | |
"History": "History" | |
}, | |
{ | |
"$": "$" | |
}, | |
{ | |
"mobx": "mobx" | |
}, | |
{ | |
"react-amap": "AMap" | |
} | |
], | |
proxy: { | |
"/api/*": { | |
"target": API, | |
"changeOrigin": true, | |
"pathRewrite": { | |
"^/api/": "/api/" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment