-
Notifications
You must be signed in to change notification settings - Fork 40
/
fec.config.js
43 lines (40 loc) · 1.08 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
const { resolve } = require('path');
const alias = require('./config/aliases');
const packageJson = require('./package.json');
const { localRoutesFor } = require('./config/helpers');
const bundle = 'insights';
const appName = packageJson[bundle].appname;
// TODO Move to fec webpack config similar to LOCAL_APPS
const routes = {
...(process.env.LOCAL_APIS && process.env.LOCAL_APIS !== ''
? localRoutesFor('/api', process.env.LOCAL_APIS)
: {}),
};
module.exports = {
appName,
appUrl: `/${bundle}/${appName}`,
useProxy: process.env.PROXY === 'true',
moduleFederation: {
shared: [
{
'react-router-dom': {
singleton: true,
import: false,
version: packageJson.dependencies['react-router-dom'],
requiredVersion: '>=6.0.0 <7.0.0',
},
},
],
exposes: {
'./RootApp': resolve(
__dirname,
`/src/${process.env.NODE_ENV !== 'production' ? 'Dev' : ''}AppEntry`
),
'./SystemDetail': resolve(__dirname, '/src/Modules/ComplianceDetails'),
},
},
resolve: {
alias,
},
routes,
};