pinojs / pino-webpack-plugin

MIT License
19 stars 9 forks source link

Multiple chunks emit assets to the same filename #150

Closed wdanilo closed 8 months ago

wdanilo commented 9 months ago

I'm trying to use this plugin, but Webpack fails with error:

Error: Conflict: Multiple chunks emit assets to the same filename index.cjs (chunks pino-file and pino-worker)
    at ...

Is this plugin working with Pino v8?

mcollina commented 9 months ago

Thanks for reporting!

Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.

SanCoder-Q commented 9 months ago

Having the same issue when add the plugin.

vikasbhandari2 commented 9 months ago

Hello @wdanilo & @SanCoder-Q,

Thank you for reporting. As suggested above, please provide steps to reproduce, for example: reproducible example,

A long shot, if in case you are using the output property, can you trying changing the following

  output: {
    filename: 'bundle.js',  ==> filename: '[name].bundle.js',
  },

and let us know if it helps. Thanks!

arash-es commented 9 months ago

Having the same issue

barelyhuman commented 9 months ago

@arash-es @SanCoder-Q @wdanilo

Can one of you confirm if this is similar to your webpack config? The focus would be the output and input configurations

https://github.com/barelyhuman/pino-webpack-150-repro/blob/main/webpack.config.js

arash-es commented 9 months ago

@arash-es @SanCoder-Q @wdanilo

Can one of you confirm if this is similar to your webpack config? The focus would be the output and input configurations

https://github.com/barelyhuman/pino-webpack-150-repro/blob/main/webpack.config.js

yes it is, and I have fixed the problem, I was using a static output filename in my Webpack configuration which caused the problem

const webpackConfig = {
//...
  output: {
    filename: server.js,
    }
}
simoneb commented 8 months ago

Closing due to lack of activity, and the other person who reported it confirmed it was a configuration issue.