rsnext/packages/next-swc
Donny/강동윤 ec8bf53907
feat(next-swc): Implement CJS optimizer (#49972)
### 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>
2023-05-23 21:38:07 +02:00
..
crates feat(next-swc): Implement CJS optimizer (#49972) 2023-05-23 21:38:07 +02:00
native Extract next-swc Rust code into its own package (#31635) 2021-11-21 12:59:56 +01:00
package.json v13.4.4-canary.5 2023-05-23 19:34:54 +00:00
README.md docs: add readme with development instructions for next/swc (#43834) 2022-12-08 13:38:44 +01:00

@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