mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
With
```js
export { x as c } from "./x.js";
```
you get these modules:
```js
"input/index.js [test] (ecmascript)"
--> a EsmAssetReference but `apply_reexport_tree_shaking` returns an `EcmascriptModuleFacadeModule`
"input/node_modules/package-named/x.js [test] (ecmascript, facade) <export x as c>"
--> a EcmascriptModulePartReference that was previously always `ExportUsage::All`
"input/node_modules/package-named/x.js [test] (ecmascript)"
```
i.e. it previously would never tree shake anything from `x.js` in this case, if there was a used renaming-reexport in front of it.
5 lines
73 B
JSON
5 lines
73 B
JSON
{
|
|
"treeShakingMode": "reexports-only",
|
|
"removeUnusedExports": true
|
|
}
|