rsnext/packages/next/build/swc
Shu Ding d5fa555841
Implement SWC transformer for server and client graphs (#40603)
This is an initial implementation of the Server Components SWC
transformer. For the server graph, it detects client entries via the
`"client"` directive and transpile them into module reference code; for
the client graph, it removes the directives. And for both graphs, it
checks if there is any invalid imports for the given environment and
shows proper errors.

With that added, we can switch from `next-flight-client-loader` to
directly use the SWC loader in one pass. Next step is to get rid of the
`.client.` extension in other plugins.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [x] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-17 00:12:59 +02:00
..
index.d.ts feat(next/swc): setup native next-swc crash reporter with platform supports (#38221) 2022-07-07 17:37:50 +00:00
index.js feat(next/swc): enable wasm first binding load for the platforms (#38883) 2022-08-23 14:59:13 -05:00
jest-transformer.js Add pagesDir to Jest transformer (#36599) 2022-05-01 16:39:30 +00:00
options.d.ts Provide page runtime parsing utils (#34922) 2022-03-02 09:41:41 -08:00
options.js Implement SWC transformer for server and client graphs (#40603) 2022-09-17 00:12:59 +02:00