Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No control over the key used for the generated importmap #4163

Open
simontaurus opened this issue Jan 1, 2025 · 0 comments
Open

No control over the key used for the generated importmap #4163

simontaurus opened this issue Jan 1, 2025 · 0 comments

Comments

@simontaurus
Copy link

simontaurus commented Jan 1, 2025

Description

Import map key generation seems to be based on the dependencies filename:

return path.name.split('.', 1)[0]

e.g.

dependencies=['node_modules/@json-editor/json-editor/dist/jsoneditor.js']

leads to the key jsoneditor which is also required in dynamic imports within custom vue components:

import("jsoneditor")

(see also #4162)

However, this may lead to conflicts if two libs use the same filename. Also, it would be preferable to use the correct package name to stay interoperable with other environments (e.g. vite):

import("@json-editor/json-editor")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant