Closed mauriceackel closed 1 year ago
My workaround for now is to downgrade to a version 0.4.x
You can change moduleResolution
option for tsconfig.json
{
"compilerOptions": {
"moduleResolution": "node16",
}
}
or
{
"compilerOptions": {
"moduleResolution": "nodenext",
}
}
Verify Next.js canary release
Describe the bug
After upgrading from
0.4.x
to0.5.6
I get an error when trying to run my test with Jest.After investigation, it seems that this plugin adds an import to my pages. The import seems to be:
In PR 57, there seems to have been a change too how the library is packaged. This leads to a case where the typescript resolver cannot resolve
next-superjson-plugin/tools
anymore.I verified this by trying to import from this module path manually, which failed. The only path I can import from is
next-superjson-plugin/dist/tools
PLEASE NOTE: Building the actual application still works and I believe this is due to
exports
configuration in your package.json. The bug is only related to type resolution with TypeScriptExpected behavior
I would expect that after the upgrade to v5, module resolution in TypeScript still works like before.
I think the package.json has to be adapted to reflect the new folder layout for TypeScript module resolution.
Reproduction link
No response
Version
0.5.6
Config
No response
Additional context
No response