Open qbikez opened 2 years ago
Why do you need this ?
I wanted to use a custom plugin, but didn't find a way to include js files other than init.js
. I wanted to keep things modular and not put everything into init.js and wanted to avoid any additional build steps.
At first, I added a custom list of js files to libs.ejs
, the same way custom css is done. But then I realized I could use ECMAScript modules and have nice, modern imports.
Ok cool I see
Custom init script is very useful, but it lacked the support for module type scripts. Modules make it possible to import other files, so you don't have to put all the code into init.js.
This PR adds handling of
init.esm.js
script as type=module.