-
Notifications
You must be signed in to change notification settings - Fork 21
/
fec.config.js
48 lines (46 loc) · 1.29 KB
/
fec.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const { dependencies, insights } = require('./package.json');
const moduleName = insights.appname.replace(/-(\w)/g, (_, match) => match.toUpperCase());
const srcDir = path.resolve(__dirname, './src');
module.exports = {
appName: moduleName,
appUrl: '/insights/content/repositories',
useProxy: true,
moduleFederation: {
moduleName,
exposes: {
'./RootApp': path.resolve(__dirname, './src/AppEntry.tsx'),
},
shared: [
{
'react-router-dom': {
singleton: true,
import: false,
version: dependencies['react-router-dom'],
requiredVersion: '>=6.0.0 <7.0.0',
},
},
{
'@unleash/proxy-client-react': {
version: dependencies['@unleash/proxy-client-react'],
singleton: true,
},
},
],
},
/**
* Add additional webpack plugins
*/
// plugins: [...(process.env.VERBOSE ? [new WatchRunPlugin()] : []), new webpack.ProgressPlugin()],
resolve: {
modules: [srcDir, path.resolve(__dirname, './node_modules')],
},
routes: {
...(process.env.BACKEND_PORT && {
'/api/content-sources/': {
host: `http://localhost:${process.env.BACKEND_PORT}`,
},
}),
},
};