Skip to content

ESM Version missing .js extensions #562

@jogibear9988

Description

@jogibear9988

We use ESM modules directly in browser with importmaps. But for the the imports have to be correct.
Your imports are missing the .js extension, this is like this not valid ESM code (at least for the browser)

Expected Behavior

all imports in the build should have a .js extension

Current Behavior

no .js extension

Possible Solution

add the .js extension already in the source or at the build, for example via babel: babel-plugin-add-import-extension

Steps To Reproduce

  1. Try to import index.js directly from a browser

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions