parcel-plugin-change-file icon indicating copy to clipboard operation
parcel-plugin-change-file copied to clipboard

Issues with parcel build when minifying

Open Jbcampbe opened this issue 6 years ago • 1 comments

I can't get this plugin to work when minification is turned on. For example if I have.

<!DOCTYPE html>
<html>
  <body>
    <!--[ <script type="text/javascript" src="cordova.js"></script> ]-->
  </body>
</html>

and run parcel build index.html

then I get

<!DOCTYPE html><html> <body>  </body> </html>

But running parcel build index.html --no-minify

gives me the desired output.

<!DOCTYPE html>
<html>
  <body>
    <script type="text/javascript" src="cordova.js"></script>
  </body>
</html>

Jbcampbe avatar Oct 31 '18 01:10 Jbcampbe

Hi @Jbcampbe I came across the same issue, It can be avoided by creating a .htmlnanorc file:

{
  "removeComments": false
}

alterebro avatar Jul 03 '19 18:07 alterebro