Registry / web-framework / susee
library1.7.4jsnpmunverified

Susee is a TypeScript-first bundler designed specifically for JavaScript/TypeScript library packages. Currently at version 1.5.1, the project has seen active development, with significant features like a plugin pipeline and stabilized dual-format output (ESM and CommonJS) introduced in version 1.0.0. It differentiates itself by offering robust dependency graph resolution, type-checking, and the ability to automatically update `package.json` fields based on the output. Susee supports multiple entry points with subpath exports and loads its configuration from `susee.config.{ts,js,mjs}`. While powerful for modern TypeScript libraries, it currently rejects CommonJS and JSX/TSX dependencies by default, requiring specific plugins for compatibility.

npm install susee
INSTALL
IMPORT
SIG · SUSEE
S
susee
web-frameworkjavascriptv1.7.4
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

SuSeeConfig
✓ import type { SuSeeConfig } from 'susee';
✗ const { SuSeeConfig } = require('susee');
Primarily imported as a type for defining the `susee.config.ts` configuration object. Susee is a TypeScript-first project.
EntryPoint
✓ import type { EntryPoint } from 'susee';
✗ import EntryPoint from 'susee';
Used as a type to define individual entry points within the `SuSeeConfig`. It is a named type import, not a default export.
SuseePlugin
✓ import type { SuseePlugin } from 'susee';
Type definition for creating custom plugins. Plugins can be sync or async and operate at dependency, pre-process, or post-process stages.

Installs Susee, generates a minimal config, and demonstrates building a project with dual ESM/CJS outputs and a subpath CLI export.

npm i -D susee npx susee init // susee.config.ts (generated by `npx susee init`) import type { SuSeeConfig } from 'susee'; const config: SuSeeConfig = { entryPoints: [ { entry: 'src/index.ts', exportPath: '.', // Main export for your package format: ['esm', 'commonjs'], // Output both ESM and CommonJS bundles }, { entry: 'src/cli.ts', exportPath: './cli', // Subpath export for a CLI utility format: ['esm'], binary: { name: 'my-cli' }, }, ], outDir: 'dist', allowUpdatePackageJson: true, // Allow Susee to update package.json with export maps // plugins: [], // Optional: add Susee plugins here }; export default config; // To build the project: npx susee
susee --version
Debug
Known issues
breakingSusee's core bundler rejects CommonJS and JSX/TSX dependencies. Direct inclusion will cause build failures.
fix
For CommonJS dependencies, install and configure `@suseejs/plugin-commonjs`. For JSX/TSX, consider pre-compiling or using an alternative bundler if a plugin is not available.
affects: >=1.0.0
gotchaThe `allowUpdatePackageJson` option is `false` by default. `package.json` fields like `type`, `main`, `module`, `types`, and `exports` will not be updated unless explicitly enabled.
fix
Set `allowUpdatePackageJson: true` in your `susee.config.ts` to allow Susee to manage these `package.json` fields automatically.
affects: >=1.0.0
gotchaSusee enforces `moduleResolution: "NodeNext"` and includes `ESNext` in `lib` internally. Projects with differing `tsconfig.json` settings for these options might experience unexpected behavior or conflicts.
fix
Align your project's `tsconfig.json` with Susee's enforced options, or ensure your codebase is compatible with `NodeNext` module resolution and `ESNext` features.
affects: >=1.0.0
gotchaThe Susee CLI only supports the `susee` (build) and `susee init` commands. Any other arguments or commands will result in an error.
fix
Ensure you only use `npx susee` or `npx susee init`. Avoid passing unsupported arguments or commands.
affects: >=1.5.1
Errors
Common errors & fixes
Error: Unsupported dependency syntax: CommonJS module 'some-cjs-package' detected. Use @suseejs/plugin-commonjs.
Attempting to bundle a dependency written in CommonJS without the necessary plugin.
fix
Install `@suseejs/plugin-commonjs` (`npm i -D @suseejs/plugin-commonjs`) and add it to your `susee.config.ts` plugins array.
Error: Entry file 'src/non-existent.ts' not found.
An `entry` path specified in `susee.config.ts` does not point to an existing file.
fix
Verify that all `entry` paths in your `susee.config.ts` correctly point to existing source files.
Error: Duplicate exportPath './subpath' detected. Each entryPoint must have a unique exportPath.
Two or more `EntryPoint` configurations have the same `exportPath` value.
fix
Ensure that every `entryPoint` in your `susee.config.ts` has a unique `exportPath` string.
Error: Unknown command 'watch'
Attempting to use an unsupported CLI command or argument with `susee`.
fix
The Susee CLI only supports `susee` (for building) and `susee init` (for config generation). Remove any other commands or arguments.
Upgrade
Version history
1.7.4latest on npm
Audit
Dependencies
@suseejs/plugin-commonjsoptionalRequired to bundle CommonJS dependencies, as Susee's core rejects them by default.
Agent activity
10 hits · last 30 days
node
8
Resources
susee — npm install susee · libregistry