-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcraco.config.js
30 lines (29 loc) · 947 Bytes
/
craco.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const CracoEsbuildPlugin = require('craco-esbuild');
const { ProvidePlugin } = require('webpack');
const cracoModuleFederation = require('@iobroker/adapter-react-v5/craco-module-federation');
module.exports = {
plugins: [{ plugin: CracoEsbuildPlugin }, { plugin: cracoModuleFederation, options: { useNamedChunkIds: true } }],
devServer: {
proxy: {
'/files': 'http://127.0.0.1:8081',
'/adapter': 'http://127.0.0.1:8081',
'/session': 'http://127.0.0.1:8081',
'/log': 'http://127.0.0.1:8081',
'/lib': 'http://127.0.0.1:8081',
},
},
webpack: {
output: {
publicPath: './',
},
plugins: [
new ProvidePlugin({
React: 'react',
}),
],
configure: webpackConfig => {
webpackConfig.output.publicPath = './';
return webpackConfig;
},
},
};