rsnext/packages/next/build
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
..
babel Make traces in development reliable (#28990) 2021-09-13 15:49:29 +02:00
output Ensure traces are flushed in development when there is an error (#29149) 2021-09-16 19:43:28 +02:00
polyfills Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
swc Update expected test output (#29146) 2021-09-16 11:52:16 -05:00
webpack add support for new URL() (#28940) 2021-09-17 19:20:09 +00:00
compiler.ts Make traces in development reliable (#28990) 2021-09-13 15:49:29 +02:00
cssnano-simple.js Use consistent postcss version for all transforms (#28529) 2021-09-02 08:45:35 +02:00
entries.ts add support for new URL() (#28940) 2021-09-17 19:20:09 +00:00
generate-build-id.ts Fix generateBuildId type that can be async function (#28040) 2021-08-12 22:26:44 +00:00
index.ts upgrade to typescript 4.4.3 (#29112) 2021-09-16 18:06:57 +02:00
is-writeable.ts Use fs.promises instead of promisify (#12026) 2020-05-02 00:10:19 -04:00
spinner.ts [Feature] Progress bar for static build (#15297) 2020-08-04 09:58:23 +02:00
utils.ts upgrade to typescript 4.4.3 (#29112) 2021-09-16 18:06:57 +02:00
webpack-config.ts add support for new URL() (#28940) 2021-09-17 19:20:09 +00:00
worker.ts use a shared worker pool for collecting page data and static page generation (#27924) 2021-08-12 19:54:49 +00:00
write-build-id.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00