You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var__toESM=(mod,isNodeMode,target)=>(target=mod!=null ? __create(__getProtoOf(mod)) : {},__copyProps(// If the importer is in node compatibility mode or this is not an ESM// file that has been converted to a CommonJS file using a Babel-// compatible transform (i.e. "__esModule" has not been set), then set// "default" to the CommonJS "module.exports" for node compatibility.isNodeMode||!mod||!mod.__esModule ? __defProp(target,"default",{value: mod,enumerable: true}) : target,mod));
That's the root cause, not sure if it is an esbuild issue or something else
Version
Details
I've checked the source code.
modern.js/packages/toolkit/node-bundle-require/src/bundle.ts
Line 96 in c389cbb
It currently only supports cjs output.
As a result, code like
is not correctly transformed and can't execute.
Reproduce link
https://github.com/yf-yang/modernjs-monorepo-example/tree/unplugin-bug
Reproduce Steps
cd apps/app pnpm dev
If remove "type": "module" from app package's package.json, the bug goes away.
The text was updated successfully, but these errors were encountered: