richardtallent / vite-plugin-singlefile

Vite plugin for inlining JavaScript and CSS resources
MIT License
810 stars 53 forks source link

script replace does not work with different arguments #2

Closed mseele closed 3 years ago

mseele commented 3 years ago

My html script tag looks like this:

<script type="module" crossorigin src="/assets/index.21d23eb8.js"></script>

and will not be replaced. I have a fix that uses a regex so the arguments are not relevant

mseele commented 3 years ago

see #3

mseele commented 3 years ago

maybe the best way to solve it is by using a html parser and avoid string replacements. But i don't have the time to refactor the code in that way.

richardtallent commented 3 years ago

Should be resolved now in 0.5.0... see comments on PR. Thanks again!