Registry / devops / rollup-plugin-ts-extract

rollup-plugin-ts-extract

JSON →
library0.0.13jsnpmunverified

Rollup plugin for extracting TypeScript API definitions into separate declaration files, enabling maximum tree-shaking of TypeScript types. Version 0.0.13. This package is in early development with minimal documentation. It differentiates itself by focusing on type extraction for tree-shaking, similar to API extractor tools but integrated as a Rollup plugin. Note: the package is unmaintained and may not work with modern Rollup versions.

npm install rollup-plugin-ts-extract
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-TS-E
R
rollup-plugin-ts-extract
devopsjavascriptv0.0.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

rollup-plugin-ts-extract
import tsExtract from 'rollup-plugin-ts-extract'
import { tsExtract } from 'rollup-plugin-ts-extract'
Default export only; named export will be undefined.
default
import tsExtract from 'rollup-plugin-ts-extract'
const tsExtract = require('rollup-plugin-ts-extract')
Package is ESM-only; require() fails with ERR_REQUIRE_ESM.
Plugin
import tsExtract from 'rollup-plugin-ts-extract'; const plugin: Plugin = tsExtract()
import { Plugin } from 'rollup-plugin-ts-extract'
Plugin type not exported; import from 'rollup' instead.

This config sets up Rollup to bundle TypeScript while extracting type declarations in ESM format.

// rollup.config.js import tsExtract from 'rollup-plugin-ts-extract'; import { defineConfig } from 'rollup'; export default defineConfig({ input: 'src/index.ts', output: { dir: 'dist', format: 'esm', }, plugins: [ tsExtract() ] });
Debug
Known issues
deprecatedPackage is unmaintained (last updated 3+ years ago).
fix
Consider alternatives like @microsoft/api-extractor or rollup-plugin-dts.
affects: >=0.0.0
gotchaDefault export only; using named import results in undefined.
fix
Use import tsExtract from 'rollup-plugin-ts-extract'.
affects: >=0.0.0
breakingESM-only package; require() throws ERR_REQUIRE_ESM.
fix
Use import syntax or dynamic import.
affects: >=0.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM
Using require() on ESM-only package.
fix
Use import tsExtract from 'rollup-plugin-ts-extract'.
Cannot find module 'rollup-plugin-ts-extract'
Package not installed or incorrect import path.
fix
Run npm install rollup-plugin-ts-extract.
Upgrade
Version history
0.0.13latest on npm
Audit
Dependencies
rolluprequiredpeer dependency for plugin functionality
Agent activity
6 hits · last 30 days
node
6
Resources
rollup-plugin-ts-extract — npm install rollup-plugin-ts-extract · libregistry