next.js
ef614072 - Ensure that barrel files behind wildcards are transformed into shortpath (#54951)

Commit
2 years ago
Ensure that barrel files behind wildcards are transformed into shortpath (#54951) This fix ensures the case that if you `import { foo } from './index'`, where: index.js: ```js export * from './subpkg' ``` subpkg.js: ```js const unrelatedExpressions = ... export { foo } from './foo' export { bar } from './bar' ``` Previously we'll transform the proxy to the second module to `export { foo } from './subpkg'`. With this fix it will be correctly optimized as `export { foo } from './foo'` which is a shorter path.
Author
Parents
Loading