CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-rollup-plugin-sizes

Show info about files/packages included with your rollup bundle

94

1.09x
Overview
Eval results
Files

task.mdevals/scenario-10/

Multi-Entry Bundle Analyzer

Create a Rollup configuration that analyzes bundle sizes across multiple entry points. The configuration should demonstrate bundle size analysis for different input formats.

Requirements

Create a rollup.config.js file that exports an array of three build configurations:

  1. Array-based input: Use multiple entry files specified as an array
  2. Object-based input: Use named entry points specified as an object
  3. Single input: Use a single entry file

Each configuration should:

  • Include bundle size analysis reporting
  • Output to the dist/ directory
  • Use ES module format

Create three source files in the src/ directory (main.js, admin.js, worker.js) that each import and use at least one function from lodash.

Capabilities

Array Input Support

  • A config with input: ["src/main.js", "src/worker.js"] creates two bundles with independent size reports @test
  • Both bundles show package breakdown including lodash @test

Object Input Support

  • A config with input: { main: "src/main.js", admin: "src/admin.js" } creates two named bundles with independent size reports @test
  • Both named bundles show package breakdown @test

Single Input Support

  • A config with input: "src/main.js" creates one bundle with size report @test
  • The bundle shows package breakdown for all included libraries @test

Implementation

@generates

Dependencies { .dependencies }

rollup-plugin-sizes { .dependency }

Provides bundle size analysis and reporting functionality for Rollup builds.

rollup { .dependency }

JavaScript module bundler used to create the bundles.

lodash { .dependency }

Utility library used in entry files to demonstrate bundle composition analysis.

Install with Tessl CLI

npx tessl i tessl/npm-rollup-plugin-sizes

tile.json