0.3.8 • Published 10 years ago

typescript-simple-loader v0.3.8

Weekly downloads
5
License
MIT
Repository
github
Last release
10 years ago

TypeScript Simple Loader

Deprecated: Please use ts-loader

NPM version NPM downloads Build status Test coverage

Feature complete TypeScript loader for webpack. Works with typescript@>=1.5.

Webpack Hot Module Replacement with TypeScript

Installation

npm install typescript-simple-loader --save

# Make sure your TypeScript-compatible compiler is installed.
npm install typescript --save

Features

  • Supports tsconfig.json
  • Supports Source Maps
  • Emits all TypeScript issues (including external dependencies like .d.ts files)
  • Emits semantic diagnostics as webpack warnings (doesn't block compilation)
  • Watches and reloads every compilation dependency (yes, even d.ts files)

Usage

Add typescript as a resolvable extension and specify this as the loader for those extensions.

module.exports = {
  entry: './main.ts',
  resolve: {
    extensions: ['', '.ts', '.tsx', '.js']
  },
  module: {
    loaders: [
      {
        test: /\.tsx?$/,
        loader: 'typescript-simple-loader'
      }
    ]
  }
}

Load tsconfig.json

The loader automatically resolves and parses tsconfig.json, based on the Webpack context, using tsconfig.

Configuration Options

You can set options by using the query string.

loaders: [
  {
    test: /\.tsx?$/,
    loader: 'typescript-simple-loader?compiler=ntypescript&configFile=tsconfig.json&ignoreWarnings[]=2304'
  }
]
  • compiler Set a custom TypeScript compiler compatible with typescript@>=1.5-alpha
  • configFile Manually set the location of the tsconfig.json file
  • ignoreWarnings Set an array of TypeScript diagnostic codes to ignore

License

MIT

0.3.8

10 years ago

0.3.7

10 years ago

0.3.6

10 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago