Open
Description
Steps to reproduce
I find difficult to give a reproducible example because broken behaviour is unpredictable and depends on module dependencies. But the general Idea I think that evaluation next/dynamic should be skipped the same wave as next/image.
Current behavior
Using next/dynamic throws an error:
EvalError: Cannot assign to read only property '__esModule' of function 'function dynamic(dynamicOptions, options) {
let loadableFn = _loadablesharedruntime.default;
let loadab...<omitted>...
The error stack:
- node_modules/@wyw-in-js/transform/lib/module.js:224:1
- node_modules/@wyw-in-js/transform/lib/module.js:118:7
- node_modules/@pigment-css/unplugin/build/index.js:103:12
- node_modules/next/dynamic.js:1:40
- node_modules/next/dynamic.js:3:3
Expected behavior
next/dynamic evaluation should be skipped the same way as next/image and next/font
Context
No response
Your environment
No response
Search keywords: next, dynamic