Skip to content

Commit

Permalink
Modify buidle example config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 8, 2019
1 parent 0f285f3 commit d1b116e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example/bundle/.kktrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import path from 'path';
export default (conf, options) => {
if (options.yargsArgs && options.yargsArgs.bundle) {
conf.devtool = false;
const regexp = /(HtmlWebpackPlugin|InlineChunkHtmlPlugin|MiniCssExtractPlugin|ManifestPlugin|GenerateSW)/;
conf.plugins = conf.plugins.map((item) => {
if (item.constructor && item.constructor.name && /(HtmlWebpackPlugin|MiniCssExtractPlugin|ManifestPlugin|GenerateSW)/.test(item.constructor.name)) {
if (item.constructor && item.constructor.name && regexp.test(item.constructor.name)) {
return null;
}
return item;
Expand Down

0 comments on commit d1b116e

Please sign in to comment.