https://github.com/eliraz-refael/dts-webpack-bundler
Bundles d.ts files into a single file in your webpack build
https://github.com/eliraz-refael/dts-webpack-bundler
build defenition dts typscript webpack webpack-plugin
Last synced: about 2 months ago
JSON representation
Bundles d.ts files into a single file in your webpack build
- Host: GitHub
- URL: https://github.com/eliraz-refael/dts-webpack-bundler
- Owner: eliraz-refael
- License: mit
- Created: 2017-10-19T10:15:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-09T08:05:33.000Z (almost 8 years ago)
- Last Synced: 2025-09-18T04:33:33.208Z (9 months ago)
- Topics: build, defenition, dts, typscript, webpack, webpack-plugin
- Language: JavaScript
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dts-webpack-bundler
This Webpack plugin generate a single TypeScript *.d.ts declaration file per entry.
### Installation
```shell
$ npm install dts-webpack-bundler --save-dev
```
### Usage
* Simply add the plugin to `webpack.config.js`:
```javascript
const DtsWebpackBundler = require('dts-webpack-bundler');
module.exports = {
entry: {
app: './src/main.ts',
component: './src/component.tsx',
},
output: {
path: path.resolve('./dist'),
filename: '[name].js'
},
plugins: [
new DtsWebpackBundler()
]
}
```
* Done! will generate `app.d.ts` and `component.d.ts` next to the `js` files in `dist` folder!
### Options
```js
new DtsWebpackBundler({
name: '[name].d.ts', // Not required, '[name].d.ts' by default (to match output fileName)
test: /\.tsx$/, // Not required, filters '.ts' and '.tsx' by default
})
```
### Have Fun!