forked from gdgphilippines/devfest2018
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack-module.config.js
38 lines (36 loc) · 983 Bytes
/
webpack-module.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
'use strict';
// const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = (IS_DEV_SERVER) => {
return {
module: {
rules: [
{
test: /\.js$/,
// We need to transpile Polymer itself and other ES6 code
// exclude: /(node_modules)/,
use: {
loader: 'babel-loader',
options: {
presets: [[
'env',
{
targets: {browsers: ['last 2 Chrome versions', 'Safari 10']},
debug: true
}
]],
plugins: [
'babel-plugin-syntax-dynamic-import',
['transform-runtime', {
'helpers': false,
'polyfill': false,
'regenerator': true
}],
['transform-object-rest-spread', {useBuiltIns: true}]
]
}
}
}
]
}
};
};