0.1.2 • Published 3 years ago
webpack5-remote-types-plugin v0.1.2
Webpack5RemoteTypesPlugin
A webpack 5 plugin to download typescript type definitions generated by dts-loader from remote.
The type packages only download one time, after initialization of webpack.
Install
yarn add -D webpack5-remote-types-plugin
Usage
new Webpack5RemoteTypesPlugin({
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.
Thanks
Many thanks Yulong Ruan!