elegantapp / pwa-asset-generator

Automates PWA asset generation and image declaration. Automatically generates icon and splash screen images, favicons and mstile images. Updates manifest.json and index.html files with the generated images according to Web App Manifest specs and Apple Human Interface guidelines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

script tags are reformatted which breaks CSP sha hashes

regular opened this issue · comments

Hi! Thanks for this amazing tool! I really enjoy the over-engineeredness of this! (scraping Apple docs)

Here is my problem:

The index.html file I want pwa-asset-generator to modify was created by piping minified browserify output through indexhtmlify and metadataify and my tools add a CSP http-equiv tag containing the sha256 of the inlined Javascript. This all works fine, except that pwa-asset-generator not only modifies the but also pretty-prints the <script> tag, which not only increases the file size, but more importantly, breaks the sha.

I file this as a bug, because I think that changes occurring outside of should not occur.

Thanks for sharing!