0.1.0 • Published 4 years ago

@covvone/typescript-declaration-webpack-plugin v0.1.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
4 years ago

typescript-declaration-webpack-plugin

Bundles typescript declarations generated by typescript loaded into one .d.ts file.

What it does

The Plugin looks at all declaration files which the typescript loader generated and merges them into one. Import will be sorted so that each module or package is only imported once.

Configuration

tsconfig.json

Add the following line to your tsconfig.json in the compiler options.

"declaration": true

Webpack Plugin

Add the following to your webpack.config.js file.

const TypescriptDeclarationPlugin = require('typescript-declaration-webpack-plugin');
...
plugins: [
  new TypescriptDeclarationPlugin({
    out: 'yeti-table.d.ts'
  })
]
...
0.1.0

4 years ago