Skip to content

Instantly share code, notes, and snippets.

@stefango
Created February 3, 2021 02:30
Show Gist options
  • Save stefango/2000e2a574d6428c3422fd7cc924889f to your computer and use it in GitHub Desktop.
Save stefango/2000e2a574d6428c3422fd7cc924889f to your computer and use it in GitHub Desktop.
roadhog config example
// 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