A webpack resolve plugin that automatically creates alias entries based on the `paths` and `baseUrl` in your `tsconfig.json`, eliminating the need to manually duplicate those mappings in your webpack config. Version 4.2.0 supports webpack 5+ and ships TypeScript types. Stable, widely used in TypeScript monorepos and migration scenarios. Distinct from manual alias configuration or alternative tools like `tsconfig-paths` as it integrates directly into webpack's resolution pipeline.
npm install tsconfig-paths-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Basic webpack configuration adding the plugin to resolve.plugins with common options.
Replace `import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'` with `import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'`.Upgrade to webpack 5 or use tsconfig-paths-webpack-plugin@3 for webpack 4.
Use `silent: true` instead of `logLevel: 'warn'`.
Update Node.js to >=10.13.0 or use tsconfig-paths-webpack-plugin@3.
Move the plugin instance to the `resolve.plugins` array in your webpack config.
Set `extensions: ['.ts', '.tsx', '.js', '.jsx']` (or match your webpack resolve.extensions).
Manually pass the same extensions as in your webpack `resolve.extensions` to the plugin.
Ensure tsconfig-paths-webpack-plugin is added to resolve.plugins and tsconfig.json has correct paths.
Move plugin to `resolve: { plugins: [...] }` in webpack config.Downgrade plugin to v3 (npm install tsconfig-paths-webpack-plugin@3) or upgrade webpack to 5.
Ensure only one instance of TsconfigPathsPlugin is added and it's a valid resolver plugin.
Create tsconfig.json or set absolute path for `configFile` option.