-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbabel.config.js
38 lines (38 loc) · 1.01 KB
/
babel.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
module.exports = {
presets: [
['@babel/env', {
loose: true,
useBuiltIns: 'usage',
...process.env.NODE_ENV === 'test' ? {} : {
modules: false,
},
}],
'@babel/typescript',
],
plugins: [
['template-html-minifier', {
modules: {
'lit-html': ['html', 'svg'], // lit-html
'lit-element': ['html', 'svg'], // LitElement
'@polymer/polymer/polymer-element': ['html'], // Polymer 3 - exported from Polymer Element
'@polymer/polymer/lib/utils/html-tag.js': ['html'], // Polymer 3 - exported from utils (used by PolymerElements family)
},
htmlMinifier: {
collapseWhitespace: true,
removeComments: true,
minifyCSS: true,
},
}],
['@babel/transform-runtime', {
corejs: 2,
sourceType: 'unambiguous',
}],
['@babel/proposal-decorators', {
decoratorsBeforeExport: true,
}],
['@babel/proposal-class-properties', {
loose: true,
}],
'@babel/syntax-dynamic-import',
],
};