Skip to content

Commit f3bce63

Browse files
committed
[core] Clarify transform-runtime, runtime version
1 parent 73fb52a commit f3bce63

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

babel.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ module.exports = {
4444
'babel-plugin-optimize-clsx',
4545
['@babel/plugin-proposal-class-properties', { loose: true }],
4646
['@babel/plugin-proposal-object-rest-spread', { loose: true }],
47-
'@babel/plugin-transform-runtime',
47+
// any package needs to declare 7.4.4 as a runtime dependency. default is ^7.0.0
48+
['@babel/plugin-transform-runtime', { version: '^7.4.4' }],
4849
// for IE 11 support
4950
'@babel/plugin-transform-object-assign',
5051
],

docs/babel.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ const alias = {
2323
};
2424

2525
module.exports = {
26-
presets: ['next/babel', '@zeit/next-typescript/babel'],
26+
presets: [
27+
// we can use the version that is referenced in the lockfile
28+
['next/babel', { 'transform-runtime': { version: '^7.7.4' } }],
29+
'@zeit/next-typescript/babel',
30+
],
2731
plugins: [
2832
'babel-plugin-optimize-clsx',
2933
// for IE 11 support

0 commit comments

Comments
 (0)