mentaljam / rollup-plugin-html2

Rollup plugin to inject bundled files to an HTML template
https://www.npmjs.com/package/rollup-plugin-html2
MIT License
20 stars 5 forks source link

Modern and legacy js injection #2

Closed stalniy closed 3 years ago

stalniy commented 4 years ago

I want to inject 2 js files, one for modern browsers <script module src="..."> and another for legacy ones <script nomodule src="...">.

Is it possible to do it right now?

mentaljam commented 4 years ago

Hi,

I have added the nomodule option and also updated an example of how to generate an HTML file with both module and nomodule scripts. It looks like a quite ugly hack but I cannot come up with anything better now.

May be you have any ideas?

mentaljam commented 3 years ago

The example was updated