-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Comments
Thanks for reporting this issue, @simontaurus! You're absolutely right: Basically using the file name for the importmap key is very fragile and can lead to conflicts rather quickly. I'm just not sure how to improve it. This is what
I don't see a generic way to find the library name like "three" or "highcharts" or "nicegui". Or should we simply hash the file path? But how would components like joystick.vue know how to import their dependencies if the prefix isn't deterministic? await import("???/nipplejs"); |
Description
Import map key generation seems to be based on the dependencies filename:
nicegui/nicegui/dependencies.py
Line 126 in 09f4c34
e.g.
leads to the key
jsoneditor
which is also required in dynamic imports within custom vue components:(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):
The text was updated successfully, but these errors were encountered: