forked from matomo-org/matomo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.js
25 lines (25 loc) · 1.08 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
module.exports = {
assumptions: {
setSpreadProperties: true,
},
presets: [
['@vue/cli-plugin-babel/preset', {
useBuiltIns: false,
// NOTE: we are disabling generator and async/await use due to
// https://github.com/vuejs/vue-cli/blob/aad72cfa7880a0e327be06b3b9c3ac3d3b3c9abc/packages/%40vue/babel-preset-app/index.js#L250
// which hardcodes the use of an inlined regenerator runtime polyfill. Using it means we have to include
// 6kb extra minified code in every plugin's UMD file. We could use a shared, global runtime for regenerator,
// but @vue/babel-preset-app won't allow us to only set the linked `regenerator` property to false while
// keeping the rest of the settings the same.
// TODO: create an issue in vue for this ^? Or maybe the final gzipped asset's size will not be affected?
exclude: [
'transform-async-to-generator',
'transform-regenerator',
'proposal-async-generator-functions',
]
}],
],
plugins: [
['@babel/plugin-proposal-object-rest-spread', { useBuiltIns: true }],
],
};