Registry / devops / esbuild-plugin-entry-chunks

esbuild-plugin-entry-chunks

JSON →
library0.1.21jsnpmunverified

An esbuild plugin (v0.1.21) that composes entry points as static chunks without extracting common code, addressing the missing manual-chunks API. It allows one entry point to reuse another as a dependency without duplicating contents. Released as a PoC, with esbuild >=0.19.0 as a peer dependency. Primary alternative to esbuild's code-splitting with dynamic imports for static chunk composition.

npm install esbuild-plugin-entry-chunks
INSTALL
IMPORT
SIG · ESBUILD-PLUGIN-ENT
E
esbuild-plugin-entry-chunks
devopsjavascriptv0.1.21
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

entryChunksPlugin
import { entryChunksPlugin } from 'esbuild-plugin-entry-chunks'
const entryChunksPlugin = require('esbuild-plugin-entry-chunks').entryChunksPlugin
Package ships TypeScript types and supports ESM; CommonJS require needs .entryChunksPlugin
default
import entryChunksPlugin from 'esbuild-plugin-entry-chunks'
import { default as entryChunksPlugin } from 'esbuild-plugin-entry-chunks'
Default export available as named export 'entryChunksPlugin'
EntryChunksPluginOptions
import { EntryChunksPluginOptions } from 'esbuild-plugin-entry-chunks'
const EntryChunksPluginOptions = require('esbuild-plugin-entry-chunks').EntryChunksPluginOptions
TypeScript type export; not available at runtime in CJS

Builds multiple entry points with static chunk composition using esbuild and esbuild-plugin-entry-chunks.

import { build } from 'esbuild'; import { entryChunksPlugin } from 'esbuild-plugin-entry-chunks'; const plugin = entryChunksPlugin(); const config = { entryPoints: ['a.ts', 'b.ts', 'c.ts'], plugins: [plugin], external: ['node:*'], bundle: true, minify: false, sourcemap: false, format: 'esm', allowOverwrite: true, }; await build(config);
Debug
Known issues
gotchaPlugin may cause output files to contain re-exported symbols from other entry points without extracting common code, leading to potential duplication across bundles.
fix
Ensure entry points are designed to be composed as dependencies (e.g., index.js vs cli.js). Use allowOverwrite: true to avoid errors.
affects: >=0.1.0
gotchaRequires esbuild >=0.19.0 due to plugin API changes; older esbuild versions may fail to load the plugin.
fix
Update esbuild to >=0.19.0.
affects: <0.19.0
gotchaPlugin is in PoC status; not recommended for production use without extensive testing.
fix
Evaluate stability and test thoroughly before using in production.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Plugin 'entry-chunks' must be used with 'bundle: true'
The plugin requires bundling to function; bundle option not set.
fix
Set bundle: true in esbuild config.
TypeError: Cannot read properties of undefined (reading 'length')
Entry points array is empty or undefined.
fix
Ensure entryPoints is an array with at least one file path.
Upgrade
Version history
0.1.21latest on npm
Audit
Dependencies
esbuildrequiredpeer dependency: plugin requires esbuild >=0.19.0
Agent activity
4 hits · last 30 days
node
4
Resources
esbuild-plugin-entry-chunks — npm install esbuild-plugin-entry-chunks · libregistry