Open RobertCZ opened 6 years ago
Trying to transpile something like
class C {} export function factory() { return new C() }
with minimal config
transpiler: 'plugin-babel', meta: { '*.js': { babelOptions: { es2015: false, }, }, },
and getting ReferenceError: C is not defined because it's transpiled to
(function(System, SystemJS) {System.register([], function (_export, _context) { "use strict"; function factory() { return new C(); } _export("factory", factory); return { setters: [], execute: function () { class C {} } }; }); })(System, System);
So scope for class C is wrong. Any way to fix/workaround it? Thanks
This should be fixed in the latest Babel releases. An update to this plugin for newer Babel builds can be made.
Trying to transpile something like
with minimal config
and getting ReferenceError: C is not defined because it's transpiled to
So scope for class C is wrong. Any way to fix/workaround it? Thanks