-
Notifications
You must be signed in to change notification settings - Fork 30
/
webpack.config.js
47 lines (38 loc) · 1.08 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
/* @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 { testGlobals } from "./test/globals";
import globals from "./globals";
const MODULE_NAME = "paypal";
export const WEBPACK_CONFIG_UI: WebpackConfig = getWebpackConfig({
context: __dirname,
entry: "./src/ui",
filename: "ui",
modulename: MODULE_NAME,
web: false,
minify: false,
libraryTarget: "commonjs2",
vars: globals,
});
export const WEBPACK_CONFIG_UI_MIN: WebpackConfig = getWebpackConfig({
context: __dirname,
entry: "./src/ui",
filename: "ui",
modulename: MODULE_NAME,
web: false,
libraryTarget: "commonjs2",
vars: globals,
});
export const WEBPACK_CONFIG_TEST: WebpackConfig = getWebpackConfig({
entry: "./test/paypal.js",
libraryTarget: "window",
test: true,
debug: true,
minify: true,
vars: {
...globals,
...testGlobals,
},
});
export default [WEBPACK_CONFIG_UI, WEBPACK_CONFIG_UI_MIN];