next.js
3e341678 - Fix missing SWC transforms for optimized barrel files (#57474)

Commit
2 years ago
Fix missing SWC transforms for optimized barrel files (#57474) With Barrel Optimization, we are trying to "shortcut" the import to be directly pointing to the final target, as barrel files shouldn't have any side effects. However, there could be `"use client"` and `"use server"` directives which we can't ignore. Hence we must apply the `serverComponents` transform of SWC to these barrel files too. Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Author
Parents
Loading