GuillaumeGomez / minifier-rs

Minifier tool/lib for JS/CSS/JSON files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run js minifier on <script> content in html minifier

GuillaumeGomez opened this issue · comments

I don't think you can assume that everything inside <script> is JavaScript

Only on type=text/javascript I suppose. The same goes for <style>.

I don't think you can make any assumptions about the body of <script> or <style>. Even if I do <script type='text/javascript'> one can still put invalid JavaScript in there

Hum, I guess. Would be great though...

In general, I suggest copying what other minifiers are doing instead of making up what you think works. I also suggest copying their test cases.