Registry / web-framework / webpack-remote-types-plugin

webpack-remote-types-plugin

JSON →
library0.2.7jsnpmunverified

Webpack plugin (v0.2.7) that downloads TypeScript type definition tarballs generated by dts-loader from remote locations (e.g., a remote Module Federation entry). It integrates with webpack's build process to fetch type definitions files at build time and unzips them into a local directory. Key differentiator: enables type checking for remote modules in a Micro-Frontend setup where type definitions are served alongside remoteEntry.js. Release cadence is irregular; currently stable but low activity.

npm install webpack-remote-types-plugin
INSTALL
IMPORT
SIG · WEBPACK-REMOTE-TYP
W
webpack-remote-types-plugin
web-frameworkjavascriptv0.2.7
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebpackRemoteTypesPlugin
✓ import WebpackRemoteTypesPlugin from 'webpack-remote-types-plugin'
✗ const WebpackRemoteTypesPlugin = require('webpack-remote-types-plugin')
Default export via ESM. If using CJS, use require with default property or use a module bundler that handles ESM interop.
WebpackRemoteTypesPlugin
✓ const WebpackRemoteTypesPlugin = require('webpack-remote-types-plugin').default;
✗ const WebpackRemoteTypesPlugin = require('webpack-remote-types-plugin');
CommonJS require does not resolve default export automatically in all setups; must use .default or set esModuleInterop.
WebpackRemoteTypesPluginOptions
✓ import type { WebpackRemoteTypesPluginOptions } from 'webpack-remote-types-plugin'
✗ type WebpackRemoteTypesPluginOptions = { remotes: object; outputDir: string; remoteFileName: string; }
TypeScript types are bundled; for type-only imports use the 'import type' syntax.

Configures the plugin to fetch and extract type definitions for a remote 'app' from localhost:9000 into a './types' directory.

// webpack.config.js const WebpackRemoteTypesPlugin = require('webpack-remote-types-plugin').default; module.exports = { plugins: [ new WebpackRemoteTypesPlugin({ remotes: { app: 'app@http://localhost:9000/remoteEntry.js', }, outputDir: 'types', remoteFileName: '[name]-dts.tgz', }), ], };
Debug
Known issues
deprecatedThe 'remoteFileName' option may be automatically derived in future versions.
fix
Always specify 'remoteFileName' explicitly to avoid breaking changes.
affects: >=0.2.0
breakingIn version 0.2.x, the plugin no longer supports the legacy 'filename' option; use 'remoteFileName' instead.
fix
Replace 'filename' with 'remoteFileName' in your configuration.
affects: >=0.2.0
gotchaThe tarball URL is constructed by replacing '[name]' in 'remoteFileName' with the remote name. Ensure your server serves the file at that exact path.
fix
Verify the URL pattern: e.g., if remote is 'app' and remoteFileName is '[name]-dts.tgz', the full URL becomes http://localhost:9000/app-dts.tgz (base URL taken from the remoteEntry URL).
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'webpack-remote-types-plugin'
Package not installed or incorrect import path.
fix
Run 'npm install webpack-remote-types-plugin --save-dev' or add it to devDependencies.
TypeError: WebpackRemoteTypesPlugin is not a constructor
Using default export incorrectly in CommonJS environment.
fix
Use 'const WebpackRemoteTypesPlugin = require('webpack-remote-types-plugin').default;'
Error: ENOENT: no such file or directory, stat 'types/app-dts.tgz'
Remote server not returning the tarball or URL mismatch.
fix
Check that the remote URL is accessible and that 'remoteFileName' matches the actual tarball filename on the server.
Upgrade
Version history
0.2.7latest on npm
Audit
Dependencies
webpackrequiredRuns as a webpack plugin; requires a webpack project (v4 or v5 likely)
dts-loaderoptionalPlugin expects dts-loader to generate the tarballs it downloads; not a runtime dep but conceptually required
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
2
Resources
webpack-remote-types-plugin — npm install webpack-remote-types-plugin · libregistry