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
I babelify + auto polyfill node_modules too; because it's usually unclear what ES version+browser libraries target nowadays. After switching to babel-polyfills (corejs3), one curious case failed.
For esm5/esm2015 builds of rxjs@6.6.3; in node_modules/rxjs/_esm5/index.js:
babel-polyfills adds import _Observable from "core-js-pure/features/observable/index.js"; at the top of the file.
then replaces some (or all) occurences of the term Observable with _Observable.
rxjs has a re-export export { Observable } from './internal/Observable';. babel-polyfills replaces that with export { _Observable as Observable } from './internal/Observable';
bundler rightfully complains that there's no _Observable in ./internal/Observable.
I see two problems here:
Why polyfill Observable in this case? Observable is imported (or re-exported) from somewhere, it's not the global Observable.
Even if it polyfills, why break the imports?
The text was updated successfully, but these errors were encountered:
This will be fixed when babel/babel#12395 is released. In the meaintinme, you can exclude that file by adding ignore: ["node_modules/rxjs/_esm5/index.js"] to your Babel config.
I babelify + auto polyfill node_modules too; because it's usually unclear what ES version+browser libraries target nowadays. After switching to
babel-polyfills
(corejs3), one curious case failed.For esm5/esm2015 builds of
rxjs@6.6.3
; innode_modules/rxjs/_esm5/index.js
:babel-polyfills
addsimport _Observable from "core-js-pure/features/observable/index.js";
at the top of the file.Observable
with_Observable
.export { Observable } from './internal/Observable';
.babel-polyfills
replaces that withexport { _Observable as Observable } from './internal/Observable';
_Observable
in./internal/Observable
.I see two problems here:
Observable
in this case?Observable
is imported (or re-exported) from somewhere, it's not the globalObservable
.The text was updated successfully, but these errors were encountered: