You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a particular case where in code there is an export * before import from the same module
export * from './random';
import {getRandom} from './random';
When TS outputs ES5+CJS mode it looks like
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require('./random'));
var random_2 = require('./random');
When the tsickle Postprocessor runs on this, it outputs
goog.module('codelab.main');var module = module || {id: 'codelab/main'};
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(goog.require('google3.javascript.typescript.examples.codelab.random'));
var random_2 = *; <------------- Oops!!
Summary:
This change just moves the ES5 postprocesing logic into
its own file. This will make subsequent modifications
simpler.
Preliminary refactoring for #162.
Reviewers: vikerman, alexeagle
Reviewed By: alexeagle
Subscribers: alexeagle, typescript-eng
Differential Revision: https://reviews.angular.io/D151
This is a particular case where in code there is an export * before import from the same module
When TS outputs ES5+CJS mode it looks like
When the tsickle Postprocessor runs on this, it outputs
The problem is here https://github.com/angular/tsickle/blob/master/src/tsickle.ts#L1179
It outputs working code(by generating two separate goog.require for the export and the import) if the above line is changed to
The text was updated successfully, but these errors were encountered: