Skip to content

Commit 704f0f6

Browse files
committed
feat(perf): use lazy module evaluation
1 parent b2a6359 commit 704f0f6

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

babel.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,11 @@ module.exports = {
1010
],
1111
require.resolve('@babel/preset-flow'),
1212
],
13-
plugins: [require.resolve('@babel/plugin-transform-strict-mode')],
13+
plugins: [
14+
require.resolve('@babel/plugin-transform-strict-mode'),
15+
[
16+
require.resolve('@babel/plugin-transform-modules-commonjs'),
17+
{ lazy: true },
18+
],
19+
],
1420
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
},
1616
"dependencies": {
1717
"@babel/core": "^7.0.0",
18+
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
1819
"@babel/plugin-transform-strict-mode": "^7.0.0",
1920
"@babel/preset-env": "^7.0.0",
2021
"@babel/preset-flow": "^7.0.0",

0 commit comments

Comments
 (0)