Have you used AI?
Yes
Bug Description
Using resolve.alias to make an alias to an absolute path of a package inside node_modules, webpack 5.109.0+ fails to resolve the package with the following error:
Module not found: Error: Can't resolve 'vendor/tippy.js'
This worked in 5.108.4
Link to Minimal Reproduction and step to reproduce
// webpack.config.js
const path = require('path');
module.exports = {
mode: 'development',
entry: './index.js',
resolve: {
alias: { vendor: path.resolve(__dirname, 'node_modules') },
},
};
// index.js
import('vendor/tippy.js');
Build with webpack 5.109.0/5.109.1 → can't resolve 'vendor/tippy.js' error
Build with webpack 5.108.4 → succeeds
Expected Behavior
vendor/tippy.js should resolve using the configured alias to <abs>/node_modules/tippy.js as it did in 5.108.4
Actual Behavior
Can't resolve error
Environment
- Webpack: first-bad at 5.109.0 (also bad at 5.109.1); last-good 5.108.4
- enhanced-resolve: 5.24.3 (identical on both)
- Node.js: v24.18.0 and v26.5.0
- OS: macOS (darwin)
- verified by installing 5.108.4 / 5.109.0 / 5.109.1 side-by-side and running the same config + entry against each
Is this a regression?
Yes (please specify version below)
Last Working Version
5.108.4
Additional Context
Investigated with the help of claude, reviewed humanly before posting
Have you used AI?
Yes
Bug Description
Using resolve.alias to make an alias to an absolute path of a package inside node_modules, webpack 5.109.0+ fails to resolve the package with the following error:
This worked in 5.108.4
Link to Minimal Reproduction and step to reproduce
Build with webpack 5.109.0/5.109.1 → can't resolve 'vendor/tippy.js' error
Build with webpack 5.108.4 → succeeds
Expected Behavior
vendor/tippy.jsshould resolve using the configured alias to<abs>/node_modules/tippy.jsas it did in 5.108.4Actual Behavior
Can't resolve error
Environment
- Webpack: first-bad at 5.109.0 (also bad at 5.109.1); last-good 5.108.4 - enhanced-resolve: 5.24.3 (identical on both) - Node.js: v24.18.0 and v26.5.0 - OS: macOS (darwin) - verified by installing 5.108.4 / 5.109.0 / 5.109.1 side-by-side and running the same config + entry against eachIs this a regression?
Yes (please specify version below)
Last Working Version
5.108.4
Additional Context
Investigated with the help of claude, reviewed humanly before posting