answer/ui/config-overrides.js

30 lines
668 B
JavaScript
Raw Normal View History

2022-09-27 17:59:05 +08:00
const path = require('path');
module.exports = {
webpack: function (config, env) {
if (env === 'production') {
config.output.publicPath = process.env.REACT_APP_PUBLIC_PATH;
2022-09-27 17:59:05 +08:00
}
config.resolve.alias = {
...config.resolve.alias,
'@': path.resolve(__dirname, 'src'),
};
return config;
},
devServer: function (configFunction) {
return function (proxy, allowedHost) {
const config = configFunction(proxy, allowedHost);
config.proxy = {
'/answer': {
2022-10-28 20:01:00 +08:00
target: 'http://10.0.10.98:2060',
2022-09-27 17:59:05 +08:00
changeOrigin: true,
secure: false,
},
};
return config;
};
},
};