ec8bf53907
### What? Implement a CJS optimizer for next-swc ### Why? x-ref: https://vercel.slack.com/archives/C02HY34AKME/p1684341093462309 Assuming most CJS files are transpiled from ESM, we can mimic tree-shaking using an AST transform. ### How? Closes WEB-1072 Fixes #48469 fix NEXT-1156 --------- Co-authored-by: Shu Ding <g@shud.in> |
||
---|---|---|
.. | ||
crates | ||
native | ||
package.json | ||
README.md |
@next/swc
This package is responsible for swc compilation customized for next.js
Development
Run tests
cargo test
# Update snapshots and fixtures for tests
UPDATE=1 cargo test
Format code before submitting code
cargo fmt
Build the binary to integrate with next.js
pnpm build-native