0.0.9 • Published 7 years ago

dts-webpack-plugin v0.0.9

Weekly downloads
113
License
MIT
Repository
github
Last release
7 years ago

dts-webpack-plugin

That Webpack plugin generate single TypeScript *.d.ts declaration file using dts-bundle.

Installation

$ npm install dts-webpack-plugin --save-dev

Usage

First you need to add the following to tsconfig.json:
{
    "compilerOptions": {
        // ...
        "declaration": true,
        "declarationDir": "./"
    }
}
Then in your webpack.config.js:
const DtsPlugin = require('dts-webpack-plugin');

module.exports = {
    entry: './src/main.ts',
    output: {
        path: path.resolve('./dist'),
        filename: 'index.js'
    },
    plugins: [
        new DtsPlugin({
            name: 'project-name'
        })
    ]
}

Result

     Asset       Size  Chunks             Chunk Names
  index.js  566 bytes       0  [emitted]  main
index.d.ts  333 bytes          [emitted]
0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago