forked from Craigdigital/paypal-checkout-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
36 lines (28 loc) · 1000 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
/* @flow */
/* eslint import/no-nodejs-modules: off, import/no-default-export: off */
import type { WebpackConfig } from 'grumbler-scripts/config/types';
import { getWebpackConfig } from 'grumbler-scripts/config/webpack.config';
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 default [ WEBPACK_CONFIG_BUTTON_RENDER ];