next.js
3f1fae94 - Implement `named_import_transform` (#54530)

Commit
2 years ago
Implement `named_import_transform` (#54530) This is the first step to enable the automatic "modularize imports" optimization for some libraries. It transforms named imports like `import { A, B, C as F } from 'foo'` to a special loader string: `import { A, B, C as F } from "barrel-optimize-loader?names=A,B,C!foo"`. In a follow-up PR we'll apply corresponding optimization with another SWC transformer.
Author
Parents
Loading