0.1.0 • Published 7 months ago

@rambler-tech/razzle-bundle-analyzer v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

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"
  }
}
0.1.0

7 months ago