-
Notifications
You must be signed in to change notification settings - Fork 5
/
webpack.config.js
40 lines (34 loc) · 987 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
35
36
37
38
39
40
/* @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";
export const FILE_NAME = "cross-domain-safe-weakmap";
export const MODULE_NAME = "xdsweakmap";
export const WEBPACK_CONFIG: WebpackConfig = getWebpackConfig({
filename: `${FILE_NAME}.js`,
modulename: MODULE_NAME,
vars: {
__MIN__: false,
__TEST__: false,
},
});
export const WEBPACK_CONFIG_MIN: WebpackConfig = getWebpackConfig({
filename: `${FILE_NAME}.min.js`,
modulename: MODULE_NAME,
minify: true,
vars: {
__MIN__: true,
__TEST__: false,
},
});
export const WEBPACK_CONFIG_TEST: WebpackConfig = getWebpackConfig({
modulename: MODULE_NAME,
options: {
devtool: "inline-source-map",
},
vars: {
__MIN__: false,
__TEST__: true,
},
});
export default [WEBPACK_CONFIG, WEBPACK_CONFIG_MIN];