Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Middleware pages/_middleware even if I don't use functions like eval and new Function #35203
Labels
bug
Issue was opened via the bug report template.
Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000
Binaries:
Node: 14.18.2
npm: 6.14.15
Yarn: 1.22.17
pnpm: N/A
Relevant packages:
next: 12.1.0
react: 17.0.2
react-dom: 17.0.2
What browser are you using? (if relevant)
N/A
How are you deploying your application? (if relevant)
N/A
Describe the Bug
next start
andnext dev
work fine, butnext build
throws the following error:This issue occurs even with a very simple middleware.
Expected Behavior
It should not trigger this error.
To Reproduce
Run a nextjs project with the following
.babelrc
The text was updated successfully, but these errors were encountered: