webpack-bundle-analyzer icon indicating copy to clipboard operation
webpack-bundle-analyzer copied to clipboard

migrate on webpack built-in logger

Open alexander-akait opened this issue 4 years ago • 4 comments

Issue description

Migrate on built-in webpack logger API https://webpack.js.org/api/logging/

Technical info

  • Webpack Bundle Analyzer version: latest
  • Webpack version: any
  • Node.js version: any
  • npm/yarn version: any
  • OS: any

Debug info

Allow to filter and configure logger options from configuration(s) + allow to collect logs from stats

What other Webpack plugins were used?

Irrelevant

alexander-akait avatar Jun 09 '20 17:06 alexander-akait

This would make webpack-bundle-analyzer only compatible with webpack v4.39.0 and forwards. Right now we're compatible with even webpack v3 if I remember correctly, so this would be a major version bump.

valscion avatar Jun 10 '20 06:06 valscion

We can't avoid breaking change using:

const logger = logging.getLogger ? logging.getLogger('webpack-bundle-analyzer') : oldLogger;

alexander-akait avatar Jun 10 '20 10:06 alexander-akait

Ah cool idea! That would be a possible idea.

valscion avatar Jun 10 '20 10:06 valscion

I would love to give it a shot 🙌

jamesgeorge007 avatar Jun 17 '20 08:06 jamesgeorge007