haifeng2013/rollup-plugin-bundle-html

defaultmode and "type="module"". How to?

frederikhors opened this issue · 1 comments

Maybe this is broken:

defaultmode: Optional. specify a value to use in the script type attribute. If no mode is specified, the type attribute is omitted. Externals can optionally override this per file.

I cannot make it work. How to?

What I need is for esm bundles:

<script type="module" src="/index.js"></script>

It appears that this feature has not been implemented.
Instead it always uses type="text/javascript".

const script = `<script type="text/javascript" src="${src}"></script>\n`;