rsnext/packages/next/types
Tobias Koppers 797dabe351
add support for new URL() (#28940)
Currently `new URL()` for server assets is completely broken because of the `publicPath` that is used for them too. `new URL()` for SSR is broken on windows as it's using absolute urls on the windows filesystem. And `new URL()` is using an incorrect filename

* Place all `asset`s correctly in `/_next/static/media` with `[name].[hash:8][ext]`
* Added a separate runtime chunk for api entries, without `publicPath`
* Introduce separate layer for api entries, which uses server-side URLs.
* Otherwise new URL() will return a faked relative URL, that is identical in SSR and CSR
* Disables react-refresh for api entries

Fixes #27413



## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have 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 helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-09-17 19:20:09 +00:00
..
global.d.ts upgrade to typescript 4.4.3 (#29112) 2021-09-16 18:06:57 +02:00
index.d.ts Update gSSP type to support props as a promise (#28999) 2021-09-10 19:36:40 +00:00
misc.d.ts Use Writable instead of Observable (#29007) 2021-09-11 00:17:56 +00:00
webpack.d.ts add support for new URL() (#28940) 2021-09-17 19:20:09 +00:00