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

feat: add possibility to extend default minimize options #414

Conversation

fretfan
Copy link
Contributor

@fretfan fretfan commented Jan 2, 2022

This PR contains a:

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

Motivation / Use-Case

Closes #413

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 2, 2022

CLA Signed

The committers are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Jan 3, 2022

Codecov Report

Merging #414 (27046df) into master (3ff3077) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #414      +/-   ##
==========================================
+ Coverage   92.15%   92.16%   +0.01%     
==========================================
  Files           7        7              
  Lines         586      587       +1     
  Branches      188      188              
==========================================
+ Hits          540      541       +1     
  Misses         37       37              
  Partials        9        9              
Impacted Files Coverage Δ
src/index.js 100.00% <ø> (ø)
src/cjs.js 100.00% <100.00%> (ø)
src/utils.js 90.04% <100.00%> (ø)

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 3ff3077...27046df. Read the comment docs.

@@ -496,7 +496,7 @@ function isProductionMode(loaderContext) {
return loaderContext.mode === "production" || !loaderContext.mode;
}

const defaultMinimizerOptions = {
export const defaultMinimizerOptions = {
Copy link
Member

Choose a reason for hiding this comment

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

Let's reexport it in index.js, we should avoid using html-loader/dist/utils, because structure can be changed, better to use require('html-loader').defaultMinimizerOptions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reexported + fixed docs

@fretfan fretfan force-pushed the feat-export-default-minimize-options branch from c1ba176 to 7e14f72 Compare January 5, 2022 19:04
@alexander-akait
Copy link
Member

Can you accept CLA?

@alexander-akait alexander-akait merged commit 0fa36af into webpack-contrib:master Jan 8, 2022
@alexander-akait
Copy link
Member

Thanks

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.

Possibility to extend default 'minimize' options
2 participants