@rambler-tech/razzle-bundle-analyzer

0.1.0 • Public • Published

Bundle Analyzer Plugin

Install

npm install -D @rambler-tech/razzle-bundle-analyzer

or

yarn add -D @rambler-tech/razzle-bundle-analyzer

Usage

Add the plugin to razzle.config.js

const BundleAnalyzerPlugin = require('@rambler-tech/razzle-bundle-analyzer')

module.exports = {
  plugins: [
    BundleAnalyzerPlugin({
      analyzerMode: 'server',
      analyzerHost: 'localhost',
      analyzerPort: 3003
    })
  ],
  modifyWebpackConfig({webpackConfig}) {
    // ...
    return webpackConfig
  }
}

Than add npm script to run analyzer to your package.json

{
  ...
  "scripts": {
    ...
    "analyzer": "BUNDLE_ANALYZER=true razzle build --noninteractive"
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @rambler-tech/razzle-bundle-analyzer

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

3.16 kB

Total Files

5

Last publish

Collaborators

  • andrepolischuk
  • rambler-ui-bot