forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonosize.config.mjs
More file actions
28 lines (23 loc) · 843 Bytes
/
monosize.config.mjs
File metadata and controls
28 lines (23 loc) · 843 Bytes
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
// @ts-check
import webpackBundler from 'monosize-bundler-webpack';
import baseConfig from '../../monosize.config.mjs';
/** @type {import('monosize').MonoSizeConfig} */
const monosizeConfig = {
...baseConfig,
bundler: webpackBundler(config => {
const normalizedTarget = /** @type {string[]}*/ (Array.isArray(config.target) ? config.target : [config.target]);
config.target = [
...normalizedTarget,
/**
* As of webpack 5, you have to add the `es5` target for IE 11 compatibility.
* Otherwise it will output lambdas for smaller bundle size.
* @see https://webpack.js.org/migrate/5/#need-to-support-an-older-browser-like-ie-11
*
* NOTE: IE 11 compat is still needed? for fluentui/react (v8) ?
*/
'es5',
];
return config;
}),
};
export default monosizeConfig;