maptool icon indicating copy to clipboard operation
maptool copied to clipboard

[Feature]: Add The ability for Add-On to specify what JavaScript it exports

Open cwisniew opened this issue 1 year ago • 2 comments

Feature Request

Add the ability for an Add-On to specify what JavaScript it exports for other Add-Ons to import. This feature should allow the exporting of specific JavaScript files or whole directories.

The Solution you'd like

Add an exports field to the libraries.json metadata file for an Add-On. e.g.

{
	"exports":  [
		"/somedir/",
		"someotherdir/somefile.js"
	]
}

Alternatives that you've considered.

No response

Additional Context

No response

cwisniew avatar Aug 06 '22 02:08 cwisniew

Partial duplicate, at least functionally, of #3513. Although this explains it better, so close mine :)

Tdue21 avatar Aug 06 '22 06:08 Tdue21

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.

cwisniew avatar Aug 06 '22 06:08 cwisniew