forked from okta/okta-auth-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbabel.cjs.js
More file actions
30 lines (30 loc) · 709 Bytes
/
Copy pathbabel.cjs.js
File metadata and controls
30 lines (30 loc) · 709 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
const sdkVersion = require('./package.json').version;
module.exports = {
sourceMaps: true,
'presets': [
'@babel/typescript',
[
'@babel/preset-env', {
'targets': {
'node': 11
},
'modules': 'commonjs'
}
]],
'plugins': [
'@babel/plugin-transform-typescript',
'@babel/plugin-proposal-class-properties',
// https://babeljs.io/docs/en/babel-plugin-transform-runtime#corejs
['@babel/plugin-transform-runtime', {
corejs: 3
}],
['@babel/plugin-transform-modules-commonjs', {
'strict': true,
'noInterop': false
}],
'add-module-exports',
['inline-replace-variables', {
'SDK_VERSION': sdkVersion
}]
]
};