• Version 3.4.5
  • Published
  • 2.9 MB
  • 10 dependencies
  • MIT license


npm i rollup-plugin-ts
yarn add rollup-plugin-ts
pnpm add rollup-plugin-ts


A TypeScript Rollup plugin that bundles declarations, respects Browserslists, and enables seamless integration with transpilers such as babel and swc



function typescriptRollupPlugin

typescriptRollupPlugin: (
pluginInputOptions?: Partial<TypescriptPluginOptions>
) => Plugin;
  • A Rollup plugin that transpiles the given input with Typescript


interface BrowserslistPathConfig

interface BrowserslistPathConfig {}

    property path

    path: string;

      interface BrowserslistQueryConfig

      interface BrowserslistQueryConfig {}

        property query

        query: string[] | string;

          interface CustomTransformerOptions

          interface CustomTransformerOptions {}

            property printer

            printer: TS.Printer;

              property program

              program: TS.Program | undefined;

                property typescript

                typescript: typeof TS;

                  method addDiagnostics

                  addDiagnostics: (...diagnostics: ExtendedDiagnostic[]) => void;

                    interface DeclarationChunkStats

                    interface DeclarationChunkStats {}

                      property externalTypes

                      externalTypes: ExternalType[];

                        interface ExternalType

                        interface ExternalType {}

                          property library

                          library: string;

                            property version

                            version: string;

                              interface TypescriptPluginOptions

                              interface TypescriptPluginOptions {}

                                property babelConfig

                                babelConfig?: string | Partial<BabelConfig>;

                                  property browserslist

                                  browserslist?: false | string[] | string | BrowserslistConfig;

                                    property cwd

                                    cwd: string;

                                      property debug

                                      debug: boolean | DebugOptionCallback;

                                        property exclude

                                        exclude: string[] | string;

                                          property fileSystem

                                          fileSystem: TS.System;

                                            property hook

                                            hook: Partial<HookRecord>;

                                              property include

                                              include: string[] | string;

                                                property swcConfig

                                                swcConfig?: string | MaybeArray<Partial<SwcConfig>>;

                                                  property transformers

                                                  | (TS.CustomTransformers | CustomTransformersFunction)[]
                                                  | TS.CustomTransformers
                                                  | CustomTransformersFunction;

                                                    property transpileOnly

                                                    transpileOnly?: boolean;

                                                      property transpiler

                                                      transpiler: Transpiler | TranspilerOptions;

                                                        property tsconfig

                                                        | string
                                                        | Partial<TS.CompilerOptions>
                                                        | Partial<InputCompilerOptions>
                                                        | TS.ParsedCommandLine
                                                        | TsConfigResolver
                                                        | TsConfigResolverWithFileName;

                                                          property typescript

                                                          typescript: typeof TS;

                                                            Type Aliases

                                                            type BrowserslistConfig

                                                            type BrowserslistConfig = BrowserslistPathConfig | BrowserslistQueryConfig;

                                                              type CustomTransformersFunction

                                                              type CustomTransformersFunction = (
                                                              options: CustomTransformerOptions
                                                              ) => TS.CustomTransformers;

                                                                type DeclarationStats

                                                                type DeclarationStats = Record<string, DeclarationChunkStats>;

                                                                  Package Files (1)

                                                                  Dependencies (10)

                                                                  Dev Dependencies (61)

                                                                  Peer Dependencies (9)


                                                                  To add a badge like this badgeto your package's README, use the codes available below.

                                                                  You may also use to create a custom badge linking to

                                                                  • Markdown
                                                                  • HTML
                                                                    <a href=""><img src="" alt=""></a>