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

plugin produces a lot of empty logs while extracting #35

Closed
deepsweet opened this issue Nov 2, 2014 · 33 comments
Closed

plugin produces a lot of empty logs while extracting #35

deepsweet opened this issue Nov 2, 2014 · 33 comments

Comments

@deepsweet
Copy link
Contributor

like this:

...
Child extract-text-webpack-plugin:

Child extract-text-webpack-plugin:

Child extract-text-webpack-plugin:

Child extract-text-webpack-plugin:

Child extract-text-webpack-plugin:
...

is it normal, or I had to see something useful? :)

@warrenrumak
Copy link

Hi @deepsweet ,
You can disable the output from Child plugins by including this in your webpack config

    stats: {
      children: false  
    }

Hope this helps a bit.

@ColCh
Copy link

ColCh commented Jan 26, 2015

advice from sokra: with the devserver: devServer: { stats: { children: false } }

@pstoica
Copy link

pstoica commented Apr 9, 2015

children: false doesn't seem to work using the CLI tool?

@luisrudge
Copy link

works fine with gulp

@pstoica
Copy link

pstoica commented Jun 1, 2015

gulp-webpack does some custom stuff. I think this was fixed through all this: webpack/webpack#980

@marr
Copy link

marr commented Jun 2, 2015

I'm still seeing the Child extract-text-webpack-plugin: output even with the stats: { children: false } set on my webpack config.

@timaschew
Copy link

@pstoica @marr

it works fine for me if I run webpack CLI with a webpack.config.js like this:

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

@mateatslc
Copy link
Contributor

i can confirm that this last one by @timaschew works fine.

@mdease-rs mdease-rs mentioned this issue Sep 15, 2015
@joezimjs
Copy link

Adding stats: { children: false } to the main context of the configuration worked for me as well. Thanks.

@vyorkin
Copy link

vyorkin commented Nov 9, 2015

Doesn't work for me, but I'm sure I've set this stats: { children: false } option

@ColCh
Copy link

ColCh commented Nov 9, 2015

@vyorkin are you sure You've added it to devServer section?

@vyorkin
Copy link

vyorkin commented Nov 9, 2015

@ColCh yes, but I don't see how its related to devServer, I've looked at the plugin source but didn't find anything relevant to these messages. Here is a part of my config:

  ........................
  devtool: false,
  stats: { children: false, colors: true, reasons: false },
  devServer:
   { contentBase: '/my-awesome-project/src',
     publicPath: '/',
     hot: true,
     historyApiFallback: true,
     headers: { 'Access-Control-Allow-Origin': '*' },
     watchOptions: { aggregateTimeout: 0 },
     stats: { children: false, colors: true, reasons: true },
     noInfo: true,
     quiet: true },
  ........................

@ColCh
Copy link

ColCh commented Nov 9, 2015

Hm... I don't know. Try to ask @sokra

@warrenrumak
Copy link

@vyorkin The part you quoted there is your dev server config, not your webpack config. stats: { children: false } goes alongside the part of your config with entry, output, resolve, module, etc.

@vyorkin
Copy link

vyorkin commented Nov 10, 2015

@ColCh @warrenrumak stats.toString({ children: false })); fixed it, thanks

@satazor
Copy link

satazor commented Dec 23, 2015

I've updated https://github.com/webpack/docs/wiki/node.js-api to include options.children.

@sokra or anyone with permission.. can we build the documentation in gh-pages? Thanks

@joshhunt
Copy link

joshhunt commented Jan 3, 2016

Extract Text Webpack Plugin is still producing quite a large amount of duplicated and unhelpful log messages. stats: {children: false} in the config and using the CLI directly.

I'm running "extract-text-webpack-plugin": "0.9.1" and "webpack": "1.12.9".

If helpful, I've got my full config and log output in this gist

@donaldpipowitch
Copy link

Thanks, works for me. I use this for minimal logging (only valid/invalid and errors):

    stats: {
      // minimal logging
      assets: false,
      colors: true,
      version: false,
      hash: false,
      timings: false,
      chunks: false,
      chunkModules: false,
      children: false
    }

@helloyou2012
Copy link
Contributor

{ children: false } not work when webpack with multi config. I use follow hack:

// Hack: remove extract-text-webpack-plugin log
compiler.plugin('done', function(stats) {
  stats.stats.forEach((stat) => {
    stat.compilation.children = stat.compilation.children.filter((child) => {
      return child.name !== 'extract-text-webpack-plugin';
    });
  });
});

@palnes
Copy link

palnes commented Aug 11, 2016

@helloyou2012 Could you provide a more complete example? We're drowning in hundreds of lines of this plugin. The other examples here have no effect.

@palnes
Copy link

palnes commented Aug 11, 2016

Nevermind, I found the culprit in some cleverly disguised require of another webpack configuraton.

@helloyou2012
Copy link
Contributor

@palnes When config is array and { children: false } will block all outputs. While { children: true } will show empty logs.

Demo: https://github.com/helloyou2012/webpack-demos/tree/master/extract-text

mohsen1 added a commit to mohsen1/DefinitelyTyped that referenced this issue Oct 16, 2016
mohsen1 added a commit to mohsen1/DefinitelyTyped that referenced this issue Oct 19, 2016
vvakame pushed a commit to DefinitelyTyped/DefinitelyTyped that referenced this issue Oct 25, 2016
@bebraw
Copy link
Contributor

bebraw commented Feb 19, 2017

Can someone try with webpack 2?

@ermakovich
Copy link

ermakovich commented Feb 26, 2017

If you are not using webpack dev server, you can pass children: false to the stats.toString method in your webpack change handler as a workaround. Example:

$.util.log(stats.toString({
  colors: true,
  chunks: false,
  hash: false,
  version: false,
  children: false
}));

@rstacruz
Copy link

Can someone try with webpack 2?

Can confirm it works with webpack@2.2.1 + extract-text-webpack-plugin@2.0.0.

@bebraw bebraw closed this as completed Feb 27, 2017
@dshook
Copy link

dshook commented Mar 1, 2017

Piggybacking off of @helloyou2012 's solution which didn't work for me in webpack 2:

function SuppressExtractTextLog () {}
SuppressExtractTextLog.prototype.apply = function(compiler){
  compiler.plugin('done', function(stats) {
    stats.compilation.children = stats.compilation.children.filter((child) => {
      return child.name !== 'extract-text-webpack-plugin';
    });
  });
}

It would be great to have an option to disable the verbosity though! I don't want to disable all children stats because that also turns off things like linting output.

@coreyleelarson
Copy link

coreyleelarson commented Mar 10, 2017

Adding { stats: { children: false } } won't work well when used in conjunction with the Webpack MultiCompiler, which outputs each config as its own child. All of the output is hidden in this scenario.

Output w/ Children:

Child CLIENT:
    Hash: d331439e8f84534232f5
    Version: webpack 1.14.0
    Time: 11793ms
                                               Asset       Size  Chunks             Chunk Names
                                    images/close.svg  252 bytes          [emitted]
                                images/hamburger.svg  282 bytes          [emitted]  
       scripts/client.d331439e8f84534232f5.bundle.js     451 kB       0  [emitted]  client
       scripts/common.d331439e8f84534232f5.bundle.js    1.49 MB       1  [emitted]  common
    scripts/polyfills.d331439e8f84534232f5.bundle.js     379 kB       2  [emitted]  polyfills
       scripts/vendor.d331439e8f84534232f5.bundle.js    4.43 kB       3  [emitted]  vendor
       styles/client.d331439e8f84534232f5.bundle.css     254 kB       0  [emitted]  client
                                          stats.json    1.65 kB          [emitted]  
       [0] multi common 88 bytes {1} [built]
        + 494 hidden modules
    
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
Child SERVER:
    Hash: 532b6d31366d08716f19
    Version: webpack 1.14.0
    Time: 11260ms
                            Asset       Size  Chunks             Chunk Names
                 images/close.svg  252 bytes          [emitted]
             images/hamburger.svg  282 bytes          [emitted]  
                 server.bundle.js    6.35 MB       0  [emitted]  server
        + 1209 hidden modules
Child ECM:
    Hash: 420fb47b15e5f3474c3d
    Version: webpack 1.14.0
    Time: 11432ms
                          Asset     Size  Chunks             Chunk Names
    scripts/ecmclient.bundle.js   813 kB       0  [emitted]  ecmclient
    styles/ecmclient.bundle.css  7.34 kB       0  [emitted]  ecmclient
        + 100 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules
    Child extract-text-webpack-plugin:
            + 2 hidden modules

Output w/out Children:

Hash: d331439e8f84534232f5532b6d31366d08716f19420fb47b15e5f3474c3d
Version: webpack 1.14.0

@bebraw bebraw reopened this Mar 11, 2017
@hiyali
Copy link

hiyali commented Apr 2, 2017

@coreyleelarson Looks like not add the config stats: { children: false } in devServer config or webpack.base config file, stats: { children: false } it's works fine for me at webpack 1.14.0 and webpack 2

Here is devServer config:

...
var app = express()
var compiler = webpack(webpackConfig)
...
var devMiddleware = require('webpack-dev-middleware')(compiler, {
  publicPath: webpackConfig.output.publicPath,
  stats: {
    colors: true,
    chunks: false,
    children: false
  }
})
...
app.use(devMiddleware)
...

@DannyFeliz
Copy link

@donaldpipowitch worked fine, thanks

@silouanwright
Copy link

yeah. as stated, the idea isn't to silence the output of all plugins... because some of it is desired (eslint for instance). So the stats: { children: false } setting doesn't really work for me and probably others.

@davidfurlong
Copy link

davidfurlong commented Jul 31, 2017

stats: "errors-only" does not work as expected with extract-text-webpack-plugin in webpack 3 https://webpack.js.org/configuration/stats/ I have also tried

stats: {
    // minimal logging
    assets: false,
    colors: true,
    version: false,
    hash: false,
    timings: false,
    chunks: false,
    chunkModules: false,
    children: false
  }

without success. I move to reopen @d3viant0ne

@davidfurlong
Copy link

Also see duplicate #97

@Diokuz
Copy link

Diokuz commented Jan 9, 2018

So, there are still no good solutions from extract-text-webpack-plugin, only bad one?

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