DTS plugin for WebPack
Inspired by this blog post.
This is wrapper for dts-bundle plugin to use inside WebPack build. Generates bundle from the .d.ts
declaration files generated by a TypeSript compiler.
Installation
npm i dts-bundle-webpack --save-dev
Usage
const DtsBundleWebpack = require('dts-bundle-webpack')
{
plugins: [
new DtsBundleWebpack({options})
]
}
List of possible options are the same as for dts-bundle plugin:
Example of all options:
var opts = {
name: 'cool-project',
main: 'build/index.d.ts',
baseDir: 'build',
out: 'dist/cool-project.d.ts',
externals: false,
referenceExternals: false,
exclude: /^defs\/$/,
removeSource: false,
newline: os.EOL,
indent: ' ',
prefix: '__',
separator: '/',
verbose: false,
emitOnIncludedFileNotFound: false,
emitOnNoIncludedFileNotFound: false,
outputAsModuleFolder: false,
headerPath: "path/to/header/file",
headerTex: ""
};
References
For all other information, please, go to original dts-bundle plugin.