forked from paypal/paypal-checkout-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
50 lines (41 loc) · 1.23 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
48
49
50
/* @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 } from "./test/globals";
import globals from "./globals";
const MODULE_NAME = "paypal";
export const WEBPACK_CONFIG_TEST: WebpackConfig = getWebpackConfig({
entry: "./test/paypal.js",
libraryTarget: "window",
test: true,
debug: true,
vars: {
...getTestGlobals(globals),
__CLIENT_ID__: "abcxyz123",
__MERCHANT_ID__: "abc",
},
});
export const WEBPACK_CONFIG_BUTTON_RENDER: WebpackConfig = getWebpackConfig({
context: __dirname,
entry: "./src/ui/buttons",
filename: "button.js",
modulename: MODULE_NAME,
web: false,
libraryTarget: "commonjs2",
vars: globals,
});
export const WEBPACK_CONFIG_TEST_BUTTON_RENDER: WebpackConfig =
getWebpackConfig({
context: __dirname,
entry: "./src/ui/buttons",
filename: "./test/button.js",
modulename: MODULE_NAME,
web: false,
libraryTarget: "commonjs2",
vars: { ...getTestGlobals(globals) },
});
export default [
WEBPACK_CONFIG_BUTTON_RENDER,
WEBPACK_CONFIG_TEST_BUTTON_RENDER,
];