For proper esm resolution, import/export file need to have a .js extension. Currently the esm index export the following:
export { default as filter } from "./filter";
export { default as flatMap } from "./flatMap";
export { default as interval } from "./interval";
export { default as map } from "./map";
export { default as merge } from "./merge";
export { default as multicast } from "./multicast";
export { default as Observable } from "./observable";
export { default as scan } from "./scan";
export { default as Subject } from "./subject";
export { default as unsubscribe } from "./unsubscribe";
which triggers an error when imported:
Module not found: Error: Can’t resolve ‘./symbols’ in ‘/path/to/node_modules/observable-fns/dist.esm’
This can be solved by adding .js to all the imports/export in the typescript source files (even if they're refering to .ts files).
For proper esm resolution, import/export file need to have a
.jsextension. Currently the esm index export the following:which triggers an error when imported:
This can be solved by adding
.jsto all the imports/export in the typescript source files (even if they're refering to .ts files).