Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Commit

Permalink
Add minimize option
Browse files Browse the repository at this point in the history
  • Loading branch information
esamattis committed Sep 3, 2020
1 parent 25ac023 commit c2d33aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions create-webpack-config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ interface Options {
*/
manifest?: boolean;

/**
* Toggle minimization optimization. Defaults to true.
*/
minimize?: boolean;

/**
* Manual cusomization of the generated config
*/
Expand Down
4 changes: 4 additions & 0 deletions create-webpack-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@ function createWebpackConfig(options = {}, customize) {
);
}

if (options.minimize === false) {
Object.assign(config.optimization, {minimize: false});
}

if (typeof customize === "function") {
return customize(config, _, args) || config;
}
Expand Down

0 comments on commit c2d33aa

Please sign in to comment.