forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
34 lines (31 loc) · 825 Bytes
/
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
// @ts-check
const resources = require('../../scripts/webpack/webpack-resources');
const BUNDLE_NAME = 'fluentui-react';
/**
* @param {object} param0
* @param {string | import("webpack").Output} param0.output - If a string, name for the output varible.
* If an object, full custom `output` config.
* @param {boolean} param0.onlyProduction
*/
function createConfig({ output, onlyProduction }) {
return resources.createBundleConfig({
bundleName: BUNDLE_NAME,
output,
entry: './lib/index.bundle.js',
onlyProduction,
});
}
module.exports = [
...createConfig({
output: 'FluentUIReact',
onlyProduction: false,
}),
...createConfig({
output: {
libraryTarget: 'umd',
library: 'FluentUIReact',
filename: `${BUNDLE_NAME}.umd.js`,
},
onlyProduction: true,
}),
];