Skip to content

Commit 614d28f

Browse files
committed
Merge pull request #29 from AllenFang/master
Avoid multiple babel-polyfill loaded
2 parents 66f405e + ed7a203 commit 614d28f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/bootstrap.loader.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ if (semver.lt(process.version, '4.0.0')) {
1616
Make sure it's installed in your 'node_modules/' directory.
1717
`);
1818
}
19-
20-
if (isBabelLatest) {
21-
require(babelLatest);
22-
} else {
23-
require(babelPrev);
19+
if (!global._babelPolyfill) {
20+
if (isBabelLatest) {
21+
require(babelLatest);
22+
} else {
23+
require(babelPrev);
24+
}
2425
}
2526
}
2627

0 commit comments

Comments
 (0)