rsnext/test/e2e/app-dir
Shu Ding b96ff8de2f
Fix CSS imports tree-shaking (#41357)
The way we currently track server CSS imports is to collect CSS files that each **module** depends on. This happens on the module graph level which is a global thing and cannot be tree-shaken properly (check the enabled test for more details).

In this PR we collect another information, of CSS files that each **entrypoint** depends on. This is the CSS list after tree-shaken on the entry level. By intersecting these CSS imports with the module-level CSS imports, we can get the final used CSS imports for each _layout_.

cc @hanneslund 

## Bug

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

## Feature

- [ ] 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`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a 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/examples/adding-examples.md)
2022-10-12 13:41:19 +00:00
..
app Test for unused css modules with layout (#41018) 2022-10-11 23:00:14 +00:00
app-alias Check required root layout tags (#41120) 2022-10-03 19:27:16 +00:00
app-edge Client component directive: use client (#41333) 2022-10-11 10:26:45 -07:00
app-prefetch Remove unnecessary experimental flag (#40766) 2022-09-21 21:30:46 +02:00
app-rendering Remove unnecessary experimental flag (#40766) 2022-09-21 21:30:46 +02:00
app-static Fix app static generation cases (#41172) 2022-10-06 21:43:23 +02:00
asset-prefix Remove unnecessary experimental flag (#40766) 2022-09-21 21:30:46 +02:00
next-font Reduce local font loader options (#41332) 2022-10-11 19:52:10 +00:00
root-layout Fix app static generation cases (#41172) 2022-10-06 21:43:23 +02:00
rsc-basic Client component directive: use client (#41333) 2022-10-11 10:26:45 -07:00
rsc-external Client component directive: use client (#41333) 2022-10-11 10:26:45 -07:00
trailingslash Remove unnecessary experimental flag (#40766) 2022-09-21 21:30:46 +02:00
with-babel Client component directive: use client (#41333) 2022-10-11 10:26:45 -07:00
app-alias.test.ts Fix latest experimental react and experimental-edge and unpin test versions (#41200) 2022-10-05 21:27:47 +00:00
app-edge.test.ts Fix latest experimental react and experimental-edge and unpin test versions (#41200) 2022-10-05 21:27:47 +00:00
app-static.test.ts Fix app static generation cases (#41172) 2022-10-06 21:43:23 +02:00
asset-prefix.test.ts Fix latest experimental react and experimental-edge and unpin test versions (#41200) 2022-10-05 21:27:47 +00:00
index.test.ts Fix CSS imports tree-shaking (#41357) 2022-10-12 13:41:19 +00:00
next-font.test.ts Reduce local font loader options (#41332) 2022-10-11 19:52:10 +00:00
prefetching.test.ts Fix latest experimental react and experimental-edge and unpin test versions (#41200) 2022-10-05 21:27:47 +00:00
rendering.test.ts Fix latest experimental react and experimental-edge and unpin test versions (#41200) 2022-10-05 21:27:47 +00:00
root-layout.test.ts Fix latest experimental react and experimental-edge and unpin test versions (#41200) 2022-10-05 21:27:47 +00:00
rsc-basic.test.ts Load beforeInteractive scripts properly without blocking hydration (#41164) 2022-10-09 15:08:51 +00:00
rsc-external.test.ts Alias next/dynamic to lazy impl for appDir (#41216) 2022-10-06 17:41:27 +02:00
trailingslash.test.ts Fix latest experimental react and experimental-edge and unpin test versions (#41200) 2022-10-05 21:27:47 +00:00
vercel-analytics.test.ts Fix latest experimental react and experimental-edge and unpin test versions (#41200) 2022-10-05 21:27:47 +00:00
with-babel.test.ts Fix latest experimental react and experimental-edge and unpin test versions (#41200) 2022-10-05 21:27:47 +00:00