-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Description
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
I'm using ky-universal in my project.
next@latest
node LTS (18)
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
pnpm
Describe the Bug
Using pages directory, everything works fine but as soon as I define experimental.appDir = true in next.config.js I have this error:
Module parse failed: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
See https://webpack.js.org/concepts#loaders
Error: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)
Expected Behavior
Just activating experimental pages should not alter anything in pages.
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://stackblitz.com/edit/nextjs-vwd7jz
To Reproduce
Example available here: https://stackblitz.com/edit/nextjs-vwd7jz
Just remove app dir in next config and it will work again.