import.meta.resolve
isn't supported by Next.js
#77157
Labels
SWC
Related to minification/transpilation in Next.js.
Link to the code that reproduces this issue
nodejs/nodejs.org#7544
To Reproduce
npm run build
on rootCurrent vs. Expected behavior
current behavior
in dev with Webpack:
Critical dependency: Accessing import.meta directly is unsupported (only property access or destructuring is supported)
in dev with Turbopack
TypeError: __TURBOPACK__import$2e$meta__.resolve is not a function
in build
TypeError: {}.resolve is not a function
expected behavior: build pass
Provide environment information
Which area(s) are affected? (Select all that apply)
SWC or Bundler
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed), next build (local), next dev (local)
Additional context
The rehype plugin that we want use, use
import.meta.resolve
.So it's may come form SWC during transformation or bundler.
The text was updated successfully, but these errors were encountered: