Closed eesdil closed 1 year ago
Please, update to the latest version of Nx or you can test it out with your repo by running nx migrate latest
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
We use "remark-gfm" plugin (which esm only package) in the nextjs application. Therefore we use dynamic impot in the next.config.js file. We have a custom docker plugin which before the 15.7.0-beta.6 was working fine.
With that release this stopped working, and giving an error message:
The problem why this is happening is, because we use dynamic import() in the next.config.js file. And during the compilation this is replaced by require() statement.
This is failing only in case of using swc. There was a change in the code which replaced the compilation settings, so I reckon that has something to do with it.
Expected Behavior
Able to use dynamic import() in next.config.js file.
GitHub Repo
https://github.com/eesdil/dynamic
Steps to Reproduce
git@github.com:eesdil/dynamic.git
cd dynamic
npm i
npx nx run next-app:fail
Nx Report
Failure Logs
No response
Additional Information
this snippet is also failing: