{"id":20813,"library":"webpack-remote-types-plugin","title":"WebpackRemoteTypesPlugin","description":"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.","status":"active","version":"0.2.7","language":"javascript","source_language":"en","source_url":"https://github.com/ruanyl/webpack-remote-types-plugin","tags":["javascript","typescript"],"install":[{"cmd":"npm install webpack-remote-types-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-remote-types-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-remote-types-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runs as a webpack plugin; requires a webpack project (v4 or v5 likely)","package":"webpack","optional":false},{"reason":"Plugin expects dts-loader to generate the tarballs it downloads; not a runtime dep but conceptually required","package":"dts-loader","optional":true}],"imports":[{"note":"Default export via ESM. If using CJS, use require with default property or use a module bundler that handles ESM interop.","wrong":"const WebpackRemoteTypesPlugin = require('webpack-remote-types-plugin')","symbol":"WebpackRemoteTypesPlugin","correct":"import WebpackRemoteTypesPlugin from 'webpack-remote-types-plugin'"},{"note":"CommonJS require does not resolve default export automatically in all setups; must use .default or set esModuleInterop.","wrong":"const WebpackRemoteTypesPlugin = require('webpack-remote-types-plugin');","symbol":"WebpackRemoteTypesPlugin","correct":"const WebpackRemoteTypesPlugin = require('webpack-remote-types-plugin').default;"},{"note":"TypeScript types are bundled; for type-only imports use the 'import type' syntax.","wrong":"type WebpackRemoteTypesPluginOptions = { remotes: object; outputDir: string; remoteFileName: string; }","symbol":"WebpackRemoteTypesPluginOptions","correct":"import type { WebpackRemoteTypesPluginOptions } from 'webpack-remote-types-plugin'"}],"quickstart":{"code":"// webpack.config.js\nconst WebpackRemoteTypesPlugin = require('webpack-remote-types-plugin').default;\n\nmodule.exports = {\n  plugins: [\n    new WebpackRemoteTypesPlugin({\n      remotes: {\n        app: 'app@http://localhost:9000/remoteEntry.js',\n      },\n      outputDir: 'types',\n      remoteFileName: '[name]-dts.tgz',\n    }),\n  ],\n};","lang":"javascript","description":"Configures the plugin to fetch and extract type definitions for a remote 'app' from localhost:9000 into a './types' directory."},"warnings":[{"fix":"Always specify 'remoteFileName' explicitly to avoid breaking changes.","message":"The 'remoteFileName' option may be automatically derived in future versions.","severity":"deprecated","affected_versions":">=0.2.0"},{"fix":"Replace 'filename' with 'remoteFileName' in your configuration.","message":"In version 0.2.x, the plugin no longer supports the legacy 'filename' option; use 'remoteFileName' instead.","severity":"breaking","affected_versions":">=0.2.0"},{"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).","message":"The tarball URL is constructed by replacing '[name]' in 'remoteFileName' with the remote name. Ensure your server serves the file at that exact path.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'activ':76 'alongsid':66 'build':30,38 'cadenc':69 'check':51 'current':72 'definit':9,35,63 'differenti':48 'directori':46 'download':6 'dts':14 'dts-loader':13 'e.g':19 'enabl':49 'entri':24 'feder':23 'fetch':33 'file':36 'frontend':59 'generat':11 'integr':26 'irregular':71 'javascript':77 'key':47 'loader':15 'local':45 'locat':18 'low':75 'micro':58 'micro-frontend':57 'modul':22,54 'plugin':3 'process':31 'releas':68 'remot':17,21,53 'remoteentry.js':67 'serv':65 'setup':60 'stabl':73 'tarbal':10 'time':39 'type':8,34,50,62 'typescript':7,78 'unzip':41 'v0.2.7':4 'webpack':2,28 'webpackremotetypesplugin':1","created_at":"2026-04-25T11:25:06.714430+00:00","updated_at":"2026-04-25T11:25:06.714430+00:00","problems":[{"fix":"Run 'npm install webpack-remote-types-plugin --save-dev' or add it to devDependencies.","cause":"Package not installed or incorrect import path.","error":"Error: Cannot find module 'webpack-remote-types-plugin'"},{"fix":"Use 'const WebpackRemoteTypesPlugin = require('webpack-remote-types-plugin').default;'","cause":"Using default export incorrectly in CommonJS environment.","error":"TypeError: WebpackRemoteTypesPlugin is not a constructor"},{"fix":"Check that the remote URL is accessible and that 'remoteFileName' matches the actual tarball filename on the server.","cause":"Remote server not returning the tarball or URL mismatch.","error":"Error: ENOENT: no such file or directory, stat 'types/app-dts.tgz'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ruanyl/webpack-remote-types-plugin","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/webpack-remote-types-plugin","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}