Skip to content

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

Open
@simontaurus

Description

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

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions