forked from krakenjs/zoid-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
68 lines (59 loc) · 1.61 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* @flow */
/* eslint import/no-default-export: off, import/no-nodejs-modules: off */
import { getWebpackConfig } from 'grumbler-scripts/config/webpack.config';
import globals from './globals';
const FILE_NAME = 'login-zoid-component';
const MODULE_NAME = 'zoidlogin';
export const WEBPACK_CONFIG_FRAME = getWebpackConfig({
filename: `${ FILE_NAME }.frame.js`,
modulename: MODULE_NAME,
minify: false,
vars: {
...globals
}
});
export const WEBPACK_CONFIG_FRAME_MIN = getWebpackConfig({
filename: `${ FILE_NAME }.frame.min.js`,
modulename: MODULE_NAME,
minify: true,
vars: {
...globals,
__MIN__: true
}
});
export const WEBPACK_CONFIG_POPUP = getWebpackConfig({
filename: `${ FILE_NAME }.popup.js`,
modulename: MODULE_NAME,
minify: false,
vars: {
...globals,
__DEFAULT_CONTEXT__: 'popup',
__POPUP_SUPPORT__: true,
__IE_POPUP_SUPPORT__: true
}
});
export const WEBPACK_CONFIG_POPUP_MIN = getWebpackConfig({
filename: `${ FILE_NAME }.popup.min.js`,
modulename: MODULE_NAME,
minify: true,
vars: {
...globals,
__DEFAULT_CONTEXT__: 'popup',
__POPUP_SUPPORT__: true,
__IE_POPUP_SUPPORT__: true,
__MIN__: true
}
});
export const WEBPACK_CONFIG_TEST = getWebpackConfig({
modulename: MODULE_NAME,
test: true,
vars: {
...globals
}
});
export default [
WEBPACK_CONFIG_FRAME,
WEBPACK_CONFIG_FRAME_MIN,
WEBPACK_CONFIG_POPUP,
WEBPACK_CONFIG_POPUP_MIN
];