Skip to content

JS copied with copyFiles still minified #1212

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

Open
mattsbennett opened this issue Jun 13, 2023 · 3 comments
Open

JS copied with copyFiles still minified #1212

mattsbennett opened this issue Jun 13, 2023 · 3 comments
Labels

Comments

@mattsbennett
Copy link

mattsbennett commented Jun 13, 2023

Recently we discovered (due to a related bug) we were re-minifying pre-minified JS libraries we were copying into place & content-hash-naming with copyFiles. This was unexpected due to the following copyFiles documentation:

webpack-encore/index.js

Lines 569 to 571 in c673202

* Notes:
* * No transformation is applied to the copied files (for instance
* copying a CSS file won't minify it)

It probably shouldn't have been unexpected, given the copied files were JS and the terser plugin just processes everything in the build target by default, but these details are also somewhat "below the surface" when using an implementation like encore.

Perhaps some documentation could be added here for this use-case, highlighting that any pre-minified JS processed this way (e.g. third-party libraries) must also be explicitly excluded from repeat-minification with configureTerserPlugin?

@carsonbot
Copy link
Collaborator

Thank you for this issue.
There has not been a lot of activity here for a while. Has this been resolved?

1 similar comment
@carsonbot
Copy link
Collaborator

Thank you for this issue.
There has not been a lot of activity here for a while. Has this been resolved?

@carsonbot
Copy link
Collaborator

Hello? This issue is about to be closed if nobody replies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants