Skip to content

Commit 7e5516b

Browse files
committed
Added webpack config
1 parent 1321356 commit 7e5516b

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
var path = require('path');
2+
3+
module.exports = [
4+
{
5+
entry: path.resolve(__dirname, 'lib/index.browser.js'),
6+
output: {
7+
path: path.resolve(__dirname, 'dist'),
8+
filename: 'optimizely.browser.umd.js',
9+
library: 'optimizelySdk',
10+
libraryTarget: 'umd',
11+
},
12+
mode: 'none',
13+
node: {
14+
// set to not polyfill setImmediate in promise polyfill
15+
// it is already wrapped in a typeof check
16+
setImmediate: false,
17+
},
18+
},
19+
{
20+
entry: path.resolve(__dirname, 'lib/index.browser.js'),
21+
output: {
22+
path: path.resolve(__dirname, 'dist'),
23+
filename: 'optimizely.browser.umd.min.js',
24+
library: 'optimizelySdk',
25+
libraryTarget: 'umd',
26+
},
27+
mode: 'production',
28+
node: {
29+
// set to not polyfill setImmediate in promise polyfill
30+
// it is already wrapped in a typeof check
31+
setImmediate: false,
32+
},
33+
module: {
34+
loaders: [
35+
{
36+
test: /\.js$/,
37+
loader: 'babel-loader?presets[]=es2015'
38+
}
39+
]
40+
}
41+
},
42+
];

0 commit comments

Comments
 (0)