Commit graph

8108 commits

Author SHA1 Message Date
Shu Ding
b610db830e
Add request deduplication to image optimizer (#24000)
This PR adds the deduplication logic to image optimizer so the cache will be reused as much as possible if there're multiple concurrent requests.

Fixes #23436.

## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added

## 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.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-04-12 22:38:51 +00:00
Tim Neutkens
25ca1b5bab v10.1.4-canary.6 2021-04-12 19:58:36 +02:00
Tim Neutkens
2dba861ea3
Enable webpack5 by default (#23810)
- Enable webpack 5 by default for apps without custom webpack configuration

Fixes #23143



## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

## 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.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-04-12 17:52:43 +00:00
Lee Robinson
d302a52bc6
Update redux-toolkit-typescript README. (#23997) 2021-04-12 11:35:37 -05:00
JJ Kasper
1be97547d9
v10.1.4-canary.5 2021-04-12 11:33:08 -05:00
JJ Kasper
ec62ea6134
Ensure minimal mode SSR 404 handling is correct (#23996) 2021-04-12 11:31:51 -05:00
JJ Kasper
f02363e0c4
Ensure no-op rewrite matches dynamic route with i18n correctly (#23860)
This ensures we match dynamic routes correctly when applying `check: true` behavior with i18n so that no-op rewrites match dynamic routes correctly. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

Fixes: https://github.com/vercel/next.js/issues/23854
2021-04-12 09:42:01 +00:00
Gary Meehan
4f7f5f30de
Increase base Lighthouse score of default Create Next App template (#23887) 2021-04-12 11:16:53 +02:00
James George
428a7de5b5
test(create-next-app): suppplying --use-npm prefers npm for installation (#23880)
This PR aims at updating the `create-next-app` test suite to include a test case for the `--use-npm` flag.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## 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.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-04-12 09:12:00 +00:00
Tim Neutkens
c5c16494e3 v10.1.4-canary.4 2021-04-12 10:34:17 +02:00
Henrik Wenz
2cfcab8a74
Update with-electron example (#23873)
This PR updates `example/with-electron`:

- Updates electron to version [12 (latest stable)](https://www.electronjs.org/releases/stable#12.0.2)
- Introduces the new `contextBridge` to increase security ([docs](https://www.electronjs.org/docs/api/context-bridge))



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## 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.

## Documentation / Examples

- [x] Make sure the linting passes
2021-04-11 15:38:15 +00:00
Tim Neutkens
2b48670bd6
Remove bugfix needed for webpack 4 when webpack 5 is used (#23886)
Tobias has fixed the `compiler.hooks.invalid.call()` bug in webpack 5 so this is no longer needed



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## 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.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-04-11 15:06:35 +00:00
Tobias Koppers
2c2ac2e868
reduce the number of write syscalls by buffering (#23863)
buffer the output of bfj to avoid 1000s of small write calls
2021-04-09 21:43:30 +00:00
JJ Kasper
de567d91d7
Update incremental migration doc and add version for new rewrites (#23859)
This updates the incremental migration doc to mention the new fallback rewrites over the previous no-op rewrite behavior. This also mentions the version the new rewrites modes were added to the rewrites doc.  

## Documentation / Examples

- [x] Make sure the linting passes
2021-04-09 18:59:59 +00:00
Tobias Koppers
1258d13d73
upgrade webpack to 5.31.2 (#23861)
https://github.com/webpack/webpack/releases/tag/v5.31.1

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## 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.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-04-09 18:31:26 +00:00
Santi Dalmasso
0af3b52640
Update Tailwind CSS example with emotion to use JIT (#23843)
## Documentation / Examples

- [X] Make sure the linting passes
2021-04-08 23:41:19 +00:00
JJ Kasper
1cf7360788
Add experimental note to docs for has (#23835)
This adds a note the `has` documentation mentioning the feature is still experimental as we currently show a warning when the feature is used stating the same. 

## Documentation / Examples

- [x] Make sure the linting passes
2021-04-08 18:39:25 +00:00
Pranav P
cffdf1e088
Update tailwind css to v2.1 with jit support (#23793)
## Documentation / Examples

- [x] Make sure the linting passes
2021-04-08 16:52:15 +00:00
Tim Neutkens
a561dd9cdb
Resolve new babel loader through require.resolve (#23819) 2021-04-08 16:15:42 +02:00
Dominik Wilkowski
761d72fbc0
Adding a plausible example (#23814)
## Documentation / Examples

- [X] Make sure the linting passes

Adding a [Plausible](https://plausible.io/) example for a google analytics alternative.
2021-04-08 14:09:19 +00:00
Tim Neutkens
911bdacf89 v10.1.4-canary.3 2021-04-08 14:48:18 +02:00
Dale Bustad
c2dfe40296
Babel fast mode (#23760)
@timneutkens it'd be great to get your input.

These changes introduce a new Babel loader that eliminates much of the existing overhead, resulting in better HMR speeds. 
 Multithreading is still in flight, and may be omitted if speed improvements end up being negligible.  For now, the new loader is hidden behind an `experimental` flag.

Items to be completed before this PR is ready to merge:

- [x] reconfigure `ncc` to precompile the parts of `@babel/core` and `@babel/traverse` that we're accessing directly
- [x] change `@babel/core/...` imports to `ncc`ed version
- [x] ~~measure multithreading (not currently pushed) functionality, and include the functionality depending on the results~~ I'll open a separate PR for this
- [x] ensure TypeScript is happy with all imports as final step (`--no-verify` was used to bypass)

There will be two follow-up PRs:
- loader support for projects with custom `.babelrc`
- multithreaded loader (should the change we warranted after measurement)
2021-04-08 12:03:02 +00:00
Pierre Berger
bce78ba89c
Fix upgrading broken link (#23785)
Fix a broken link in the [upgrading documentation](https://github.com/vercel/next.js/blob/canary/docs/upgrading.md).
2021-04-08 10:15:37 +00:00
Turadg Aleahmad
7f6a74a8e2
docs: Update built-in-css-support.md with Linaria example (#23333)
add link to Linaria example
2021-04-07 23:20:03 +00:00
Max Leon
d34c9f16d8
Fixed issue accessing index page of "with-reason-relay" example (#23780)
Within the "with-reason-relay" example:
- Redirect from NextJS-routed root route to reason-compiled home



## Bug

- [x] Related issues linked using `fixes #23607 `
- [ ] Integration tests added

## Feature

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

## Documentation / Examples

- [x] Make sure the linting passes
2021-04-07 19:18:56 +00:00
Tobias Koppers
c5cf9e4c69
upgrade to webpack 5.31.0 (#23776)
* fixes a bundle size regression from webpack 4 to 5
* fixes these warnings during resolving build dependencies for packages using `exports`

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## 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.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-04-07 18:55:06 +00:00
Tim Neutkens
d2dc91c80c
Add note about prefetching (#23732)
Fixes #23687



## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added

## 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.

## Documentation / Examples

- [x] Make sure the linting passes
2021-04-07 16:07:32 +00:00
JJ Kasper
23ad3a7189
v10.1.4-canary.2 2021-04-06 12:26:23 -05:00
JJ Kasper
348115036c
Ensure no-op export returns without error (#23752)
This ensures we don't reach the invariant from trying to create the export progress with no items during `next build` or `next export` by returning immediately when we notice there are no paths being exported. Additional tests have been added to ensure these cases don't error. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

Fixes: https://github.com/vercel/next.js/issues/23724
2021-04-06 17:12:23 +00:00
Rishabh Poddar
f7d0bd115c
Update to with-supertokens example (#23728)
- Updated dependency version
- Optimises for serverless execution by taking advantage of `/tmp` folder (enabled via a config setting)
2021-04-06 12:45:09 +00:00
JJ Kasper
45b8c88521
Ensure fallback rewrites dont match over pages with i18n (#23674)
This ensures we are checking the filesystem correctly when i18n is used to prevent fallback rewrites from being applied even when a page is matched. Additional tests have been added to ensure these cases are being handled. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

Fixes: https://github.com/vercel/next.js/issues/23577
2021-04-06 10:25:04 +00:00
JJ Kasper
55c6b7aba2
Ensure basePath is not applied for external GSSP redirect (#23673)
This ensures we don't attempt prepending the `basePath` for external (http://) `getStaticProps`/`getServerSideProps` redirects. Additional tests to cover this case have been added in the `gssp-redirect` test suites to prevent regression.

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

Fixes: https://github.com/vercel/next.js/issues/23623
2021-04-06 10:02:13 +00:00
Felipe Lima
c2c1b96544
Fix webpack5 cache distDir (#23718)
## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

## 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.

## Documentation / Examples

- [ ] Make sure the linting passes

Fixes: #23716
2021-04-06 08:32:29 +00:00
JJ Kasper
9986d7c92e
v10.1.4-canary.1 2021-04-05 14:10:54 -05:00
Gerald Monaco
63b96b1884
Stop mutating resolvedAsPath (#23705)
Follow up to #23614. `resolvedAsPath` isn't actually even being used as an output, we're just mutating it for convenience. If we do want to output it in the future, we can do it a different way (i.e. via return).
2021-04-05 18:51:21 +00:00
Janicklas Ralph
8fdcc52854
Font optimization (#21676)
Enable font optimization by default
2021-04-05 17:47:03 +00:00
JJ Kasper
bf629f9427
v10.1.4-canary.0 2021-04-05 11:17:37 -05:00
JJ Kasper
88fd76f4d2
Ensure default fallback values are correct with i18n (#23675)
This ensures we don't parse the default params when auto-exporting dynamic routes with i18n since the page and path aren't equal when localized. This adds an additional test case to ensure we don't regress on this behavior in the `i18n-support` test suites.

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

Fixes: https://github.com/vercel/next.js/issues/23167
2021-04-04 14:09:20 +00:00
Rayhan Arayilakath
0d98cd9037
Fix: Codeblock Syntax Highlighting (#23545)
I don't believe NodeJS code should receive Bash syntax highlighting :).



## Bug

- [x] Related issues linked using `fixes #number`
- [] Integration tests added

## 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.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-04-04 01:39:54 +00:00
david
9d2962cfab
fix with-mqtt-js example. (#23636)
## Documentation / Examples

- [x] Make sure the linting passes

***

Related to #23607

We should use `NEXT_PUBLIC_`  as [stated here](https://nextjs.org/docs/basic-features/environment-variables) to expose environment variables to the browser.

The code was already using the correct variables name.
2021-04-02 16:33:30 +00:00
david
6b2a2d9bc5
fix with-styled-jsx-plugins example. (#23635)
## Documentation / Examples

- [x] Make sure the linting passes

***

Related to #23607

Bump packages fixed the example and worked fine on macOS.
2021-04-02 16:28:34 +00:00
david
c46e99d346
fix with-web-worker example. (#23634)
## Documentation / Examples

- [x] Make sure the linting passes

***

Related to #23607

Instead of using a third-party loader `worker-plugin`, we leverage the use of `webpack 5` built-in worker support.

https://nextjs.org/docs/messages/webpack5
https://webpack.js.org/guides/web-workers/
2021-04-02 16:20:45 +00:00
rpxs
be0957650d
fixes a part of #23607 remove with-glamor example (#23639)
## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added

## 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.

## Documentation / Examples

- [ ] Make sure the linting passes

The `with-glamor` package has been unmaintained for 4 years now.
2021-04-02 13:38:58 +00:00
Tim Neutkens
29aa48dfc4 v10.1.3 2021-04-02 12:24:12 +02:00
Tim Neutkens
6e51f2a816 v10.1.3-canary.2 2021-04-02 12:22:15 +02:00
Gerald Monaco
af3315b14d
Clean up RenderOptsPartial (#23614)
* Remove autoExport from RenderOpts

* Remove ampMode from RenderOpts

* Stop passing inAmpMode and hybridAmp

* Unset nextExport when falsy
2021-04-01 20:21:15 -05:00
JJ Kasper
95b9839622
v10.1.3-canary.1 2021-04-01 15:15:29 -05:00
Tobias Koppers
0ad805fee6
update webpack to 5.30 (#23612)
* has some memory usage improvements
* after a while cache entries that are unused and already persistent to disk are removed from the memory cache
  * When are read again, they are restored from disk again
  * Should play well together with adding and removing pages due to on-demand-entries

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## 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.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-04-01 19:25:57 +00:00
Sam Robbins
4de984ca23
Update router.md to improve a11y (#23611)
Code examples used `span`, change to use `button` for better accessibility 

## Documentation / Examples

- [x] Make sure the linting passes
2021-04-01 18:26:19 +00:00
JJ Kasper
bfd36bd227
Update custom-routes-proxying to use fallback rewrites (#23610)
This updates to use the new `fallback` rewrites support instead of the previous no-op rewrite workaround. 


## Documentation / Examples

- [x] Make sure the linting passes
2021-04-01 16:48:49 +00:00