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

Remove redundant chunkFilter #243

Merged
merged 1 commit into from
May 4, 2020
Merged

Remove redundant chunkFilter #243

merged 1 commit into from
May 4, 2020

Conversation

Dekkee
Copy link
Contributor

@Dekkee Dekkee commented May 4, 2020

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

If plugin uses minimize options from compiler.optimization, it will fail because of default terser plugin options object. Field chunkFilter is not allowed, but it contains in default options object.
Example: https://github.com/NekR/offline-plugin/blob/66cde2c7784b5be8c84fecbb93c6f9f96faacdb5/src/service-worker.js#L106

As i see, chunkFilter never uses in plugin, so it can be removed easily.

Minimal repo to reproduce:
https://github.com/Dekkee/terser-bug

Breaking Changes

no breaking changes according to 3.0.0 release

@jsf-clabot
Copy link

jsf-clabot commented May 4, 2020

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented May 4, 2020

Codecov Report

Merging #243 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #243      +/-   ##
==========================================
- Coverage   96.02%   96.01%   -0.01%     
==========================================
  Files           5        5              
  Lines         403      402       -1     
  Branches      151      150       -1     
==========================================
- Hits          387      386       -1     
  Misses         16       16              
Impacted Files Coverage Δ
src/index.js 99.24% <ø> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f4812c...1a1fcb2. Read the comment docs.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexander-akait alexander-akait merged commit 7220734 into webpack-contrib:master May 4, 2020
@lesterchan
Copy link

lesterchan commented May 5, 2020

I think 3.0.1 tag need to be released for this PR. Getting a error with 3.0.0

ValidationError: Invalid options object. Terser Plugin has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'chunkFilter'. These properties are valid:

@CalculonPrime
Copy link

Why was chunkFilter removed? I need it to disable optimization for certain chunks, but now I can't. How is it redundant?

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

Successfully merging this pull request may close these issues.

5 participants