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: 3 months ago
JSON representation
Webpack plugin to download remote typescript types
- Host: GitHub
- URL: https://github.com/ruanyl/webpack-remote-types-plugin
- Owner: ruanyl
- License: mit
- Created: 2021-05-24T20:11:43.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-12T19:08:40.000Z (over 3 years ago)
- Last Synced: 2025-04-02T08:07:58.612Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 229 KB
- Stars: 44
- Watchers: 2
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
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