{"id":14079,"library":"susee","title":"Susee TypeScript Bundler","description":"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.","status":"active","version":"1.5.1","language":"javascript","source_language":"en","source_url":"https://github.com/phothinmg/susee","tags":["javascript","bundler","susee","suseejs","typescript"],"install":[{"cmd":"npm install susee","lang":"bash","label":"npm"},{"cmd":"yarn add susee","lang":"bash","label":"yarn"},{"cmd":"pnpm add susee","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to bundle CommonJS dependencies, as Susee's core rejects them by default.","package":"@suseejs/plugin-commonjs","optional":true}],"imports":[{"note":"Primarily imported as a type for defining the `susee.config.ts` configuration object. Susee is a TypeScript-first project.","wrong":"const { SuSeeConfig } = require('susee');","symbol":"SuSeeConfig","correct":"import type { SuSeeConfig } from 'susee';"},{"note":"Used as a type to define individual entry points within the `SuSeeConfig`. It is a named type import, not a default export.","wrong":"import EntryPoint from 'susee';","symbol":"EntryPoint","correct":"import type { EntryPoint } from 'susee';"},{"note":"Type definition for creating custom plugins. Plugins can be sync or async and operate at dependency, pre-process, or post-process stages.","symbol":"SuseePlugin","correct":"import type { SuseePlugin } from 'susee';"}],"quickstart":{"code":"npm i -D susee\nnpx susee init\n\n// susee.config.ts (generated by `npx susee init`)\nimport type { SuSeeConfig } from 'susee';\n\nconst config: SuSeeConfig = {\n  entryPoints: [\n    {\n      entry: 'src/index.ts',\n      exportPath: '.', // Main export for your package\n      format: ['esm', 'commonjs'], // Output both ESM and CommonJS bundles\n    },\n    {\n      entry: 'src/cli.ts',\n      exportPath: './cli', // Subpath export for a CLI utility\n      format: ['esm'],\n      binary: { name: 'my-cli' },\n    },\n  ],\n  outDir: 'dist',\n  allowUpdatePackageJson: true, // Allow Susee to update package.json with export maps\n  // plugins: [], // Optional: add Susee plugins here\n};\n\nexport default config;\n\n// To build the project:\nnpx susee\n","lang":"typescript","description":"Installs Susee, generates a minimal config, and demonstrates building a project with dual ESM/CJS outputs and a subpath CLI export."},"warnings":[{"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.","message":"Susee's core bundler rejects CommonJS and JSX/TSX dependencies. Direct inclusion will cause build failures.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Set `allowUpdatePackageJson: true` in your `susee.config.ts` to allow Susee to manage these `package.json` fields automatically.","message":"The `allowUpdatePackageJson` option is `false` by default. `package.json` fields like `type`, `main`, `module`, `types`, and `exports` will not be updated unless explicitly enabled.","severity":"gotcha","affected_versions":">=1.0.0"},{"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.","message":"Susee enforces `moduleResolution: \"NodeNext\"` and includes `ESNext` in `lib` internally. Projects with differing `tsconfig.json` settings for these options might experience unexpected behavior or conflicts.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure you only use `npx susee` or `npx susee init`. Avoid passing unsupported arguments or commands.","message":"The Susee CLI only supports the `susee` (build) and `susee init` commands. Any other arguments or commands will result in an error.","severity":"gotcha","affected_versions":">=1.5.1"}],"env_vars":null,"search_vec":"'1.0.0':46 '1.5.1':20 'abil':61 'activ':25 'automat':63 'base':67 'bundler':3,10,109 'check':58 'commonj':42,97 'compat':107 'configur':82 'current':17,95 'default':102 'depend':53,100 'design':11 'develop':26 'differenti':48 'dual':37 'dual-format':36 'entri':74 'esm':40 'export':78 'featur':29 'field':66 'first':9 'format':38 'graph':54 'introduc':43 'javascript':108 'javascript/typescript':14 'js':86 'jsx/tsx':99 'librari':15,93 'like':30 'load':80 'mjs':87 'modern':91 'multipl':73 'offer':51 'output':39,70 'packag':16 'package.json':65 'pipelin':33 'plugin':32,105 'point':75 'power':89 'project':22 'reject':96 'requir':103 'resolut':55 'robust':52 'seen':24 'signific':28 'specif':12,104 'stabil':35 'subpath':77 'support':72 'suse':1,4,71,110 'susee.config':84 'suseej':111 'ts':85 'type':57 'type-check':56 'typescript':2,8,92,112 'typescript-first':7 'updat':64 'version':19,45","created_at":"2026-04-20T01:57:49.028316+00:00","updated_at":"2026-04-20T01:57:49.028316+00:00","problems":[{"fix":"Install `@suseejs/plugin-commonjs` (`npm i -D @suseejs/plugin-commonjs`) and add it to your `susee.config.ts` plugins array.","cause":"Attempting to bundle a dependency written in CommonJS without the necessary plugin.","error":"Error: Unsupported dependency syntax: CommonJS module 'some-cjs-package' detected. Use @suseejs/plugin-commonjs."},{"fix":"Verify that all `entry` paths in your `susee.config.ts` correctly point to existing source files.","cause":"An `entry` path specified in `susee.config.ts` does not point to an existing file.","error":"Error: Entry file 'src/non-existent.ts' not found."},{"fix":"Ensure that every `entryPoint` in your `susee.config.ts` has a unique `exportPath` string.","cause":"Two or more `EntryPoint` configurations have the same `exportPath` value.","error":"Error: Duplicate exportPath './subpath' detected. Each entryPoint must have a unique exportPath."},{"fix":"The Susee CLI only supports `susee` (for building) and `susee init` (for config generation). Remove any other commands or arguments.","cause":"Attempting to use an unsupported CLI command or argument with `susee`.","error":"Error: Unknown command 'watch'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.7.4","cli_name":"susee","cli_version":null,"type":"library","homepage":"https://susee.netlify.app","github":"https://github.com/phothinmg/susee","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/susee","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-18","install_tag":null}}