Previously, webpack would attempt to resolve @svgr/webpack relative to
the Next.js project, which would result in an error like this using
strict package managers like pnpm / Yarn PnP:
Module not found: Can't resolve '@svgr/webpack' in '/path/to/project'
Previously, webpack would attempt to resolve @svgr/webpack relative to the Next.js project, which would result in an error like this using strict package managers like pnpm / Yarn PnP:
Using
require.resolve()
fixes this.