-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathwebpack.config.js
42 lines (35 loc) · 1.06 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
/* @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";
const FILE_NAME = "jsx-pragmatic";
const MODULE_NAME = "pragmatic";
export const WEBPACK_CONFIG: WebpackConfig = getWebpackConfig({
filename: `${FILE_NAME}.js`,
modulename: MODULE_NAME,
minify: false,
});
export const WEBPACK_CONFIG_MIN: WebpackConfig = getWebpackConfig({
filename: `${FILE_NAME}.min.js`,
modulename: MODULE_NAME,
minify: true,
vars: {
__MIN__: true,
},
});
export const WEBPACK_CONFIG_TEST: WebpackConfig = getWebpackConfig({
modulename: MODULE_NAME,
options: {
devtool: "inline-source-map",
},
vars: {
__TEST__: true,
},
});
export const WEBPACK_CONFIG_DEMO: WebpackConfig = getWebpackConfig({
entry: "./demo/dev/index.jsx",
filename: `${FILE_NAME}-demo.js`,
modulename: MODULE_NAME,
minify: false,
});
export default [WEBPACK_CONFIG, WEBPACK_CONFIG_MIN, WEBPACK_CONFIG_DEMO];