react-csp icon indicating copy to clipboard operation
react-csp copied to clipboard

How to not prettify the html ?

Open saideepesh000 opened this issue 4 years ago • 3 comments

Hi @YIZHUANG , this is project is cool, but I have a concern, when I run react-csp dev or prod, it's prettifying the index.html, but I have some script tags which look gibberish and they shouldn't be prettified, in this case, what should be done ?

Thank you

saideepesh000 avatar Sep 02 '21 07:09 saideepesh000

Can you make a pull request? To pass an argument, pretty or not

YIZHUANG avatar Sep 02 '21 15:09 YIZHUANG

Hi @YIZHUANG , sure will do, BTW yarn build is not generating the inline-scripts hashes or nonces accordingly, is it a known issue ?

saideepesh000 avatar Sep 02 '21 15:09 saideepesh000

you can also move your script tag out of index.html in another file. I had a case where I wanted index.html as readable and I had added it as part of https://github.com/YIZHUANG/react-csp/pull/2/files

saurabhnemade avatar Sep 02 '21 16:09 saurabhnemade