webpack-typescript-config-dump-plugin
Version:
A webpack plugin to cache compiled typescript config on the file system
55 lines (38 loc) • 1.7 kB
Markdown
# [Webpack plugin] Dump Typescript Config into file system
A webpack plugin to dump compiled typescript config into file system. Is useful in case
you have resolve aliases formed dynamically and want your IDE to be able to handle them.
#### For webpack config file you can use [webpack-config-dump-plugin](https://www.npmjs.com/package/webpack-config-dump-plugin)

<img alt="npm version" src="https://img.shields.io/npm/v/webpack-typescript-config-dump-plugin">
## Installation
```
npm i webpack-typescript-config-dump-plugin --save-dev
```
## Usage
### Javascript module
```js
const {
TypescriptConfigDumpPlugin,
} = require("webpack-typescript-config-dump-plugin");
// webpack config
{
plugins: [new TypescriptConfigDumpPlugin(options)];
}
```
### Typescript module
```typescript
import { TypescriptConfigDumpPlugin } from "webpack-typescript-config-dump-plugin";
// webpack config
{
plugins: [new TypescriptConfigDumpPlugin(options)];
}
```
### Options and defaults
| Option | Type | Required | Default | Description |
| ---------- | ------ | -------- | ------------------- | ------------------------- |
| outputPath | string | no | ./ | Path to store config dump |
| name | string | no | webpack.config.dump | Dump filename |
### Changes
- Version 2
In version 2 the plugin has been rewritten using Typescript.
**BREAKING**: Now it needs to be imported as ES module. Check the information above for details.