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

Closed
mattsbennett opened this issue Jun 13, 2023 · 4 comments
Closed

JS copied with copyFiles still minified #1212

mattsbennett opened this issue Jun 13, 2023 · 4 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.

@carsonbot
Copy link
Collaborator

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

@carsonbot carsonbot closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2025
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