-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack-module.config.js
More file actions
37 lines (35 loc) · 992 Bytes
/
webpack-module.config.js
File metadata and controls
37 lines (35 loc) · 992 Bytes
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
'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: [[
'@babel/preset-env',
{
targets: { browsers: ['last 2 Chrome versions', 'Safari 10'] },
debug: true
}
]],
plugins: [
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-transform-runtime', {
'helpers': false,
'regenerator': true
}],
['@babel/plugin-proposal-object-rest-spread', { useBuiltIns: true }]
]
}
}
}
]
}
};
};