@bundle-analyzer/core

Bundle Analyzer Node.js uploader.

Usage no npm install needed!

<script type="module">
  import bundleAnalyzerCore from 'https://cdn.skypack.dev/@bundle-analyzer/core';
</script>

README

@bundle-analyzer/core

Official Node.js package compatible with Bundle Analyzer service.

Install

npm install --save-dev @bundle-analyzer/core

Usage

import { uploadStats } from '@bundle-analyzer/core'
import webpackStats from './webpack-stats.json'

uploadStats({ webpackStats, token: '<repository-token>' })
  .then(() => {
    console.log('uploaded)
  })

Options

webpackStats

Stats generated from webpack.

token

You can specify the token using options or environment variable BUNDLE_ANALYZER_TOKEN.

fileSystem

Custom filesystem.

context

Search the config file from this repository.

configFile

Specify a custom config file.

Complete documentation

👉 See full documentation

License

MIT