Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minified JavaScript gets prettified when serializing AST #1110

Open
Munter opened this issue Aug 22, 2020 · 0 comments
Open

Minified JavaScript gets prettified when serializing AST #1110

Munter opened this issue Aug 22, 2020 · 0 comments

Comments

@Munter
Copy link
Member

Munter commented Aug 22, 2020

When you load a minified javascript, parse it to AST and serialize that AST back to text, the text output will have human-readable output with newlines, indentation, etc.

In order to retain the minification of the JavaScript output, one needs to explicitly call jsAsset.minify().

Expected behavior:

Assegraph should keep minified assets minified, despite them going through AST parsing, modification and serializations.

Relates to Munter/netlify-plugin-hashfiles#134

Munter added a commit that referenced this issue Aug 22, 2020
…r to output text the same way when serializing. Fixes #1110
Munter added a commit that referenced this issue Aug 22, 2020
…r to output text the same way when serializing. Fixes #1110
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant