dts-generator-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

dts-generator-webpack-plugin

A plugin that executes dts-generator and appends the results to the webpack compilation as an additional asset.

Usage

import DtsGeneratorPlugin, {IDtsGeneratorPluginOptions} from 'dts-generator-webpack-plugin';
import resolve from 'path';
import {Configuration} from 'webpack';
 
const dtsGeneratorPluginOptions: IDtsGeneratorPluginOptions = {
    name: 'myPackage'
};
const webpackConfig: Configuration = {
    entry: 'index.ts',
    output: {
        path: resolve(__dirname, 'dist'),
    },
    plugins: [
        new DtsGeneratorPlugin(dtsGeneratorPluginOptions)
    ]
};
export default webpackConfig;

Options

All options provided by dts-generator are supported. The option out is no longer required and will be ignored if set as this plugin instead appends it as an additional asset to the webpack build. The Webpack configuration's output will instead decide where the generated d.ts file is placed.

Package Sidebar

Install

npm i dts-generator-webpack-plugin

Weekly Downloads

6

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mtraynham