Acode icon indicating copy to clipboard operation
Acode copied to clipboard

Allow using 'import' in plugins

Open 7HR4IZ3 opened this issue 1 year ago • 3 comments

Screenshot_2023-09-17-15-08-49-609_com foxdebug acodefree

Line 10;

Add 'type="module"' to the script tag so plugins can import external files that using just one file. /

7HR4IZ3 avatar Sep 17 '23 14:09 7HR4IZ3

Screenshot_2023-09-17-15-08-49-609_com foxdebug acodefree

Line 10;

Add 'type="module"' to the script tag so plugins can import external files that using just one file. /

What do you mean by that? Make the plugin in es6?

sebastianjnuwu avatar Sep 17 '23 14:09 sebastianjnuwu

Right now, if the plugin has extra dependencies, you have use bundle it into just one js file using something like browserify, but using modules allows you to use import statement, thereby removing the need for bundling, at least for local files.

7HR4IZ3 avatar Sep 17 '23 14:09 7HR4IZ3

Right now, if the plugin has extra dependencies, you have use bundle it into just one js file using something like browserify, but using modules allows you to use import statement, thereby removing the need for bundling, at least for local files.

Just import that dependency through script tag.

bajrangCoder avatar Sep 18 '23 01:09 bajrangCoder