rsnext/test/e2e/app-dir/app/public
Shu Ding e933e1d211
Load beforeInteractive scripts properly without blocking hydration (#41164)
This PR ensures that for the app directory, `beforeInteractive`, `afterInteractive` and `lazyOnload` scripts via `next/script` are properly supported.

For both `beforeInteractive` and `afterInteractive` scripts, a preload link tag needs to be injected by Float. For `beforeInteractive` scripts and Next.js' polyfills, they need to be manually executed in order before starting the Next.js' runtime, without blocking the downloading of HTML and other scripts.

This PR doesn't include the `worker` type of scripts yet.

Note: in this PR I changed the inlined flight data `__next_s` to `__next_f`, and use `__next_s` for scripts data, because I can't find a better name for `next/script` that is also short at the same time.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] 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`
- [x] 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-09 15:08:51 +00:00
..
hello.txt Rename app paths folder (#37146) 2022-05-25 11:46:26 +02:00
test1.js Load beforeInteractive scripts properly without blocking hydration (#41164) 2022-10-09 15:08:51 +00:00
test2.js Load beforeInteractive scripts properly without blocking hydration (#41164) 2022-10-09 15:08:51 +00:00
test3.js Load beforeInteractive scripts properly without blocking hydration (#41164) 2022-10-09 15:08:51 +00:00
test4.js Load beforeInteractive scripts properly without blocking hydration (#41164) 2022-10-09 15:08:51 +00:00