Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-typescript2

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-typescript2

Seamless integration between Rollup and TypeScript. Now with errors.

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is rollup-plugin-typescript2?

rollup-plugin-typescript2 is a Rollup plugin that integrates TypeScript compilation into the Rollup bundling process. It provides advanced TypeScript features, incremental compilation, and better error reporting compared to other TypeScript plugins for Rollup.

What are rollup-plugin-typescript2's main functionalities?

TypeScript Compilation

This feature allows you to compile TypeScript files into JavaScript as part of the Rollup bundling process. The plugin reads the tsconfig.json file for TypeScript configuration.

const typescript = require('rollup-plugin-typescript2');

module.exports = {
  input: 'src/main.ts',
  output: {
    file: 'bundle.js',
    format: 'cjs'
  },
  plugins: [
    typescript({
      tsconfig: 'tsconfig.json'
    })
  ]
};

Incremental Compilation

This feature enables incremental compilation, which speeds up the build process by only recompiling files that have changed since the last build.

const typescript = require('rollup-plugin-typescript2');

module.exports = {
  input: 'src/main.ts',
  output: {
    file: 'bundle.js',
    format: 'cjs'
  },
  plugins: [
    typescript({
      tsconfig: 'tsconfig.json',
      useTsconfigDeclarationDir: true
    })
  ]
};

Error Reporting

This feature provides enhanced error reporting, making it easier to debug TypeScript compilation issues. The 'clean' option ensures that the cache is cleared before each build, which can help in identifying persistent errors.

const typescript = require('rollup-plugin-typescript2');

module.exports = {
  input: 'src/main.ts',
  output: {
    file: 'bundle.js',
    format: 'cjs'
  },
  plugins: [
    typescript({
      tsconfig: 'tsconfig.json',
      clean: true
    })
  ]
};

Other packages similar to rollup-plugin-typescript2

Keywords

FAQs

Package last updated on 16 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc