New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

typescript-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-webpack-plugin

A webpack plugin used to compile typescript projects.

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

Typescript webpack plugin

A webpack plugin used to compile typescript projects.

Here we use typecript compiler instead of language service, in order to speed up the starting process, so all the files speciefied in file glob are compiled in bulk.

A naive file change detection was implemented in order to compile only changed files (and dependencies) on every run, other compiled files are stored in a cache directory.

Plugin options

{
  tsconfig: { filesGlob: string[], compilerOptions: ts.CompilerOptions },
  transpileOnly?: boolean; //not implemented yet
  cacheDir?: string;
  include?: string[];
  exclude?: string[];
}

Sample configuration

var TSPlugin = require('typescript-webpack-plugin');
config = {
    module: {
    ...
    loaders: [
        {
            test: /\.ts$/,
            loader: ['typescript-webpack-plugin/dist/loader'],
            exclude: /(node_modules|dist)/
        }
    ...
    },
    plugins = [
    ...
      new TSPlugin({tsconfig: require('./tsconfig.json')})
    ...

    )
    ...
}

A lot of code is from ts-loader, here I'm trying to learn from it and make the start up of the application faster.

Keywords

typescript-plugin

FAQs

Package last updated on 10 Mar 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