-
Notifications
You must be signed in to change notification settings - Fork 568
/
webpack.config.size.js
38 lines (31 loc) · 1019 Bytes
/
webpack.config.size.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
/* @flow */
/* eslint import/no-nodejs-modules: off, import/no-default-export: off */
import type { WebpackConfig } from "@krakenjs/webpack-config-grumbler/index.flow";
import { getWebpackConfig } from "@krakenjs/webpack-config-grumbler";
import { getTestGlobals, fundingEligibility } from "./test/globals";
import globals from "./globals";
const testGlobals = getTestGlobals(globals);
for (const fundingSource of Object.keys(fundingEligibility)) {
fundingEligibility[fundingSource].eligible = fundingSource === "paypal";
}
const CHECK_SIZE_CONFIG: WebpackConfig = getWebpackConfig({
filename: "size",
entry: "./src/interface/button.js",
minify: false,
sourcemaps: false,
analyze: true,
vars: {
...testGlobals,
},
});
const CHECK_SIZE_MIN_CONFIG: WebpackConfig = getWebpackConfig({
filename: "size",
entry: "./src/interface/button.js",
minify: true,
sourcemaps: false,
analyze: true,
vars: {
...testGlobals,
},
});
export default [CHECK_SIZE_CONFIG, CHECK_SIZE_MIN_CONFIG];