Skip to content
Permalink
Browse files

fix(bundler): enable tracing @babel/polyfill

core-js uses "var define = ..." everywhere, we need to force cjs wrap before we can switch to dumberjs bundler.
  • Loading branch information...
huochunpeng committed Feb 10, 2019
1 parent 02d1cd0 commit 1bef8934dde83074270c12415ecdcab1645dd6c1
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/build/bundled-source.js
@@ -216,7 +216,10 @@ exports.BundledSource = class {
let contents;
// forceCjsWrap bypasses a r.js parse bug.
// See lib/amodro-trace/read/cjs.js for more info.
let forceCjsWrap = !!modulePath.match(/(\/|\\)(cjs|commonjs)(\/|\\)/i);
let forceCjsWrap = !!modulePath.match(/(\/|\\)(cjs|commonjs)(\/|\\)/i) ||
// core-js uses "var define = ..." everywhere, we need to force cjs
// before we can switch to dumberjs bundler
(desc && desc.name === 'core-js');

try {
contents = cjsTransform(modulePath, this.contents, forceCjsWrap);

0 comments on commit 1bef893

Please sign in to comment.
You can’t perform that action at this time.