next-svgr icon indicating copy to clipboard operation
next-svgr copied to clipboard

Resolve @svgr/webpack relative to next-svgr

Open elliottsj opened this issue 5 years ago • 0 comments

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.

elliottsj avatar Oct 06 '19 20:10 elliottsj