forked from cerner/terra-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
59 lines (55 loc) · 1.41 KB
/
webpack.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
57
58
59
const path = require('path');
const { merge } = require('webpack-merge');
const {
TerraDevSite,
} = require('@cerner/terra-dev-site');
const WebpackConfigTerra = require('@cerner/webpack-config-terra');
const coreConfig = (env = {}) => ({
plugins: [
new TerraDevSite({
defaultLocale: env.defaultLocale,
primaryNavigationItems: [{
path: '/home',
label: 'Home',
contentExtension: 'home',
additionalContent: [
{
label: 'Home',
filePath: path.resolve(process.cwd(), 'README.md'),
},
],
}, {
path: '/application',
label: 'Application',
contentExtension: 'app',
}, {
path: '/components',
label: 'Components',
contentExtension: 'doc',
}, {
path: '/dev_tools',
label: 'Developer Tools',
contentExtension: 'tool',
}, {
path: '/guides',
label: 'Guides',
contentExtension: 'guide',
}, {
path: '/tests',
label: 'Tests',
contentExtension: 'test',
}, {
path: '/provider',
label: 'Provider',
contentExtension: 'provider',
}],
sideEffectImportFilePaths: [
path.resolve(process.cwd(), 'initalizeXFC.js'),
],
}),
],
});
const mergedConfig = (env, argv) => (
merge(WebpackConfigTerra(env, argv), coreConfig())
);
module.exports = mergedConfig;