-
Notifications
You must be signed in to change notification settings - Fork 18
/
fec.config.js
38 lines (36 loc) · 1.18 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
const path = require('path');
const { webpack, CopyWebpackPlugin } = require('weldable/lib/packages');
const { dotenv } = require('weldable');
const {
// DEV_BRANCH,
_BUILD_DIST_DIR: DIST_DIR,
_BUILD_STATIC_DIR: STATIC_DIR,
HOT: _INSIGHTS_HOT,
PROXY_VERBOSE: _INSIGHTS_PROXY_VERBOSE,
REACT_APP_ENV: DOTENV_ENV
} = dotenv.setupDotenvFilesForEnv({ env: (process.env.NODE_ENV === 'development' && 'proxy') || process.env.NODE_ENV });
module.exports = {
appUrl: '/subscriptions/usage',
debug: true,
// env: (/(prod|stage|qa|ci)(-stable|-beta)$/.test(DEV_BRANCH) && DEV_BRANCH) || 'stage-stable',
useProxy: true,
proxyVerbose: _INSIGHTS_PROXY_VERBOSE === 'true',
interceptChromeConfig: false,
plugins: [
new webpack.IgnorePlugin({ resourceRegExp: /\.(md)$/ }),
...dotenv.setupWebpackDotenvFilesForEnv({ env: DOTENV_ENV }),
new CopyWebpackPlugin({
patterns: [{ from: path.join(STATIC_DIR, 'locales'), to: path.join(DIST_DIR, 'locales'), noErrorOnMissing: true }]
})
],
...(() => {
if (_INSIGHTS_HOT === 'true') {
return { _unstableHotReload: true };
}
return undefined;
})(),
moduleFederation: {
exclude: [],
shared: []
}
};