You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally users can create a import-map.json in the root of the asset registry which is used by the editor when parsing scripts, in the launcher when running and also during bundling and exporting. This would allow import maps to be edited both by hand and by an editor panel for installing modules from NPM.
The import map for the Editor script should be generated automatically, and I don't think it should be exposed to users. This import map will contain records that follow the assets folder structure.
An additional option could be the ability to set the script import name on the asset itself, which will add another import map record during generation.
Custom import maps - could be used per project, just like the "External Scripts" feature in the settings. With similar UX.
So that way there is little possibility for a human mistake (by editing a JSON), and there is still flexibility to define custom import names and/or external imports.
First class support for Import Maps
As we move toward support for ESM Scripts playcanvas/engine#4767, users should be able define import maps in esm scripts such as..
This will allow the to use module specifiers in their project, which helps to structure projects
Ideally users can create a
import-map.json
in the root of the asset registry which is used by the editor when parsing scripts, in the launcher when running and also during bundling and exporting. This would allow import maps to be edited both by hand and by an editor panel for installing modules from NPM.Tasks
"firebase": "https://esm.run/firebase"
https://github.com/playcanvas/editor-ui/pull/254The text was updated successfully, but these errors were encountered: