next-svgr
next-svgr copied to clipboard
Resolve @svgr/webpack relative to next-svgr
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'
Using require.resolve()
fixes this.