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

Log Spam #97

Closed
igl opened this issue Aug 22, 2015 · 7 comments
Closed

Log Spam #97

igl opened this issue Aug 22, 2015 · 7 comments

Comments

@igl
Copy link

igl commented Aug 22, 2015

For every file this plugin extracts, it prints a meaningless message into the stdout.
I just started on a project with this integrated and i already have a wall of:

Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
...

Is there a way to silence this plugin?

@mdease-rs
Copy link

From #35, this worked for me:

module.exports = {
    stats: { children: false },
   // other settings
}

@igl igl closed this as completed Feb 2, 2016
nylen added a commit to redmountainmakers/kilntroller-ui that referenced this issue Aug 7, 2016
Dev mode: list of 486 modules included in chunk

Production mode: 8 of these:

    Child extract-text-webpack-plugin:
            + 2 hidden modules

References:

- webpack-contrib/extract-text-webpack-plugin#97
- http://webpack.github.io/docs/node.js-api.html#stats
- https://github.com/webpack/webpack/blob/v1.13.1/lib/Stats.js
ryardley added a commit to ryardley/seek-style-guide that referenced this issue Feb 14, 2017
Extract text plugin was spamming the output with "Child extract-text-webpack-plugin: + 19 hidden
modules" 30 odd times. This fix surpresses those log reports. reference
webpack-contrib/extract-text-webpack-plugin#97
@adamvleggett
Copy link

Please reopen this bug. It is not adequate to just hide stats from all children. If a config is sent as an array, there will be no output at all then.

@vdh
Copy link

vdh commented Jul 11, 2017

@d3viant0ne Hey, this is still a bug. As already mentioned, the workaround is not adequate.

@le0nik
Copy link

le0nik commented Jul 11, 2017

Here's a simple webpack plugin I use that does the job of cleaning up the log spam. But I agree that it should be configurable within extract-text-webpack-plugin itself.

class CleanUpStatsPlugin {
  /**
   * @param {Object} child
   * @param {string} child.name
   * @returns {boolean}
   */
  shouldPickStatChild(child) {
    return child.name.indexOf('extract-text-webpack-plugin') !== 0;
  }

  apply(compiler) {
    compiler.plugin('done', stats => {
      if (Array.isArray(stats.compilation.children)) {
        stats.compilation.children = stats.compilation.children.filter(child => this.shouldPickStatChild(child));
      }
    });
  }
}

module.exports = CleanUpStatsPlugin;

@antialias
Copy link

antialias commented Feb 28, 2018

@le0nik I hope you don't mind that I published your code as a package on npm's registry:
https://www.npmjs.com/package/clean-up-extract-text-plugin-output

@pietrofxq
Copy link

You can also call webpack with the --hide-modules flag.

@und3fined
Copy link

Please set stats to devServer.
Not set to webpack.config.js

Example:

devServer: {
        host: '0.0.0.0',
        port: config.webpack.HMR_PORT,

        // respond to 404s with index.html
        historyApiFallback: true,

        // enable HMR on the server
        hot: true,
        publicPath: '/',
        noInfo: false,
        inline: true,
        disableHostCheck: true,
        stats: {
            children: false,
            chunks: false,
            chunkModules: false,
            modules: false,
            reasons: false,
            usedExports: false,
        },
    },

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants