4e8e191a6e
We need to handle cjs cases for client/server components when they're compiled to commonjs in some cases. e.g. if there's an internal `_app.server.js` in nextjs, the assets in the dist files are compiled to cjs by swc. Or any 3rd party libraries are consumed could be cjs only. ### How it works * Detect the source file is ESM or CJS first by detect if there's any ESM import/export * Append the new exports or collect exports info based on the module type |
||
---|---|---|
.. | ||
app | ||
test | ||
unsupported-native-module |