-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbabel.config.js
More file actions
36 lines (36 loc) · 1.41 KB
/
babel.config.js
File metadata and controls
36 lines (36 loc) · 1.41 KB
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
module.exports = {
presets: [
['@babel/preset-env', {
targets: { node: '8' },
/*
* useBuiltIns configures how @babel/preset-env handles polyfills.
* useBuiltIns: 'usage' - adds specific imports for polyfills when they are used in each file.
* useBuiltIns: 'entry' - adds individual requires to different core-js entry points based on environment.
* useBuiltIns: false - does not add polyfills automatically per file
*
* Note:
* This library (serverless-pg) does not currently require polyfills
* but it may in the future. When a polyfill for node 8 is needed,
* a polyfill dependency will need to be added (such as
* @babel/polyfill or core-js/stable.
* See https://babeljs.io/docs/en/babel-polyfill).
*
*/
useBuiltIns: 'usage',
/*
* corejs - This option only has an effect when used alongside
* useBuiltIns: usage or useBuiltIns: entry, and ensures
* @babel/preset-env injects the correct imports for your
* core-js version.
*/
corejs: 2,
/*
* modules: 'auto' (default) which will automatically select 'false' if the current
* process is known to support ES module syntax, or "commonjs" otherwise.
* When targeting node v8, transformations from ES module syntax to module.exports
* will occur.
*/
modules: 'auto',
}],
],
};