Skip to content

ESM build import/export are missing file extensions #22

Description

@dmnsgn

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions