Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ruanyl/webpack-remote-types-plugin

Webpack plugin to download remote typescript types
https://github.com/ruanyl/webpack-remote-types-plugin

Last synced: 2 months ago
JSON representation

Webpack plugin to download remote typescript types

Awesome Lists containing this project

README

        

## WebpackRemoteTypesPlugin

A webpack plugin to download typescript type definitions generated by [dts-loader](https://github.com/ruanyl/dts-loader)
from remote.

### Install

```
yarn add webpack-remote-types-plugin
```

### Usage

```javascript
new WebpackRemoteTypesPlugin({
remotes: {
app: 'app@http://localhost:9000/remoteEntry.js',
},
outputDir: 'types', // supports [name] as the remote name
remoteFileName: '[name]-dts.tgz' // default filename is [name]-dts.tgz where [name] is the remote name, for example, `app` with the above setup
}),
```

The plugin will download tarball from `http://localhost:9000/app-dts.tgz` and unzip the tarball to `./types` folder