generated from RedHatInsights/frontend-starter-app
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathfec.config.js
56 lines (55 loc) · 1.53 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
49
50
51
52
53
54
55
56
const { resolve } = require('path');
const { sentryWebpackPlugin } = require('@sentry/webpack-plugin');
module.exports = {
appUrl: '/openshift/insights/advisor',
debug: true,
useProxy: process.env.PROXY === 'true',
proxyVerbose: true,
/**
* Change to false after your app is registered in configuration files
*/
sassPrefix: 'ocp-advisor, ocpAdvisor',
/**
* Add additional webpack plugins
*/
devtool: 'hidden-source-map',
plugins: [
// Put the Sentry Webpack plugin after all other plugins
...(process.env.ENABLE_SENTRY
? [
sentryWebpackPlugin({
...(process.env.SENTRY_AUTH_TOKEN && {
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
org: 'red-hat-it',
project: 'ocp-advisor',
moduleMetadata: ({ release }) => ({
dsn: `https://27daee0fa0238ac7f7d5389b8ac8f825@o490301.ingest.us.sentry.io/4508683272454144`,
org: 'red-hat-it',
project: 'ocp-advisor',
release,
}),
}),
]
: []),
],
...(process.env.HOT
? { hotReload: process.env.HOT === 'true' }
: { hotReload: true }),
...(process.env.port ? { port: parseInt(process.env.port) } : {}),
moduleFederation: {
exclude: ['react-router-dom'],
shared: [
{
'react-router-dom': {
singleton: true,
import: false,
version: '^6.3.0',
},
},
],
},
exposes: {
'./RootApp': resolve(__dirname, '../src/AppEntry'),
},
};