Skip to content
This repository was archived by the owner on Feb 18, 2020. It is now read-only.

Commit 847c4c0

Browse files
committed
Exclude regenerator runtime from main bundle
Added to polyfills chunk
1 parent faaaf8a commit 847c4c0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

babel.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ module.exports = {
2626
plugins: [
2727
[
2828
'@babel/plugin-transform-runtime',
29-
{ useESModules: isDevelopment || isProduction },
29+
{
30+
useESModules: isDevelopment || isProduction,
31+
// Regenerator runtime is included in polyfills
32+
regenerator: false,
33+
},
3034
],
3135
],
3236
overrides: [

src/polyfills.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require('@babel/runtime/regenerator/')
12
require('whatwg-fetch')
23

34
export {}

0 commit comments

Comments
 (0)