Skip to content

Resolve @svgr/webpack relative to next-svgr#2

Open
elliottsj wants to merge 1 commit intoAnomen:masterfrom
elliottsj:resolve-svgr
Open

Resolve @svgr/webpack relative to next-svgr#2
elliottsj wants to merge 1 commit intoAnomen:masterfrom
elliottsj:resolve-svgr

Conversation

@elliottsj
Copy link

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant