maptool
maptool copied to clipboard
[Feature]: Add Ability for JavaScript to import JavaScript from Add-Ons (GraalVM)
Feature Request
JavaScript code in MapTool should be able to import JavaScript from Add-Ons
The Solution you'd like
GraalVM supports imports and a Polygot File System can be created which will restrict imports to JavaScript contained in Add-Ons.
- JavaScript within and Add-On should be able to import any code in the same Add-On using a relative path (it will not have to be exported).
- JavaScript will be able to import code from an Add-On using an absolute path in the form of
/addon/<addon namespace>/path/to/javascript.js
This will have to be exported by the Add-On to be accessed (see #3523)
Alternatives that you've considered.
No response
Additional Context
This feature request is only for the GraalVM enabling of JavaScript imports, #3523 will add the functionality to Add-Ons which allows exporting of JavaScript and the ability for this change to check if the file is exported/fetch read the file
@perkinslr created this issue to track import for GraalVM if you want me assign it to you please add a comment so GitHub will allow me to do so :)
Partial duplicate, at least functionally, of #3513. Although this explains it better, so close mine :)
Partial duplicate, at least functionally, of #3513. Although this explains it better, so close mine :)
This is not for webview, no real plans for webview at the moment as we don't have really any control over it. You can use esbuild, or webpack or something similar.
It's ok, my primary issues regarding modules is for graalvm.
WebView can approximate with <script defer src=".."></script>
so that's good.
I think the text in my issue is outdated :)
@perkinslr created this issue to track import for GraalVM if you want me assign it to you please add a comment so GitHub will allow me to do so :)
Pong.