Commit graph

7878 commits

Author SHA1 Message Date
JJ Kasper
0088caa1ea
v10.0.8-canary.9 2021-02-25 09:36:47 -06:00
JJ Kasper
6d068aed4f
Fix experimental optimizeCss for SSR (#22513)
This ensures `distDir` is set under `renderOpts` in `next-server` so that it is present when experimental `optimizeCss` is enabled. 

x-ref: https://github.com/vercel/next.js/pull/16539
2021-02-25 09:56:11 +00:00
Noah Fischer
c81eadc6dc
moving to upstash and new integration (#22436) 2021-02-24 23:51:41 +00:00
Alex Castle
a0d44ca311
Allow smaller sizes in srcset for image with fill layout and sizes prop (#21670)
Currently, the image component doesn't handle use of the `sizes` property with `layout="fill"` and `layout="responsive"` very well for small viewports. It will never include sizes smaller than the smallest viewport (640px) in the srcset, so even if you specify `sizes="30vw"` in your image, you have to download the full-viewport-width image on small devices. 

This PR adds logic such that if you use `layout="fill"` and include a `sizes` property, the image component will include the full range of image sizes in the `srcset`.

It also includes an optimization where it finds the smallest `vw` value in the sizes value and combines that with the smallest viewport width, and uses that as the floor of the srcset. It does this so it doesn't unnecessarily increase transfer size by including ALL sizes. This is still a conservative optimization--for 95% of cases, taking the _largest_ `vw` size would work, but I don't see a way to do that without breaking a few corner cases.

The case of a sizes prop with `px` values is fixed but not optimized--though generally that case is less of a good fit for the fill or responsive layout anyway.
2021-02-24 22:57:19 +00:00
JJ Kasper
d9bb645c03
Mention regex route behavior with i18n (#22500)
This mentions how locale routes are transformed when `locale: false` is not used to explain why regex routes might not match with i18n. 

Closes: https://github.com/vercel/next.js/issues/21507
2021-02-24 19:04:30 +00:00
JJ Kasper
b90b4b503c
v10.0.8-canary.8 2021-02-24 10:26:52 -06:00
Joe Haddad
775bdc341e
fix: correctly handle fallbacks for webpack 5 (#22497)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-02-24 10:25:57 -06:00
JJ Kasper
9d2b0fc04a
Ensure rewrites are resolved while prefetching (#22442)
This ensures we handle resolve rewrites during prefetching the same way we do during a client-transition. Previously if a rewritten source was used in an `href` neither the page bundle or SSG data if needed would be prefetched although would work correctly on a client transition. 


Fixes: https://github.com/vercel/next.js/issues/22441
2021-02-24 15:37:13 +00:00
Johan Eliasson
a78e904fc8
example: Nhost with auth and realtime graphql example added (#22493) 2021-02-24 14:18:05 +00:00
Lee Robinson
460c7c7ddc
Update deployment docs to mention caveat on next.config.js. (#22480) 2021-02-24 04:21:43 +00:00
Alex
e5bc0cdae0
docs(deployment): Update working directory in builder stage (#22478)
Update docker file example in deploy documentation to use correct working directory in builder stage. It will fail to copy files from that stage since it's attempting to copy files that don't exist.
2021-02-24 03:52:36 +00:00
Armando Magalhães
1253a11971
docs(deployment): Add Docker Image section (#17794)
Add a Docker Image section into the Deployment Documentation with an example and how to build and run it.

The example is a multi-stage docker image with node modules layer caching for faster builds in development and a result image just with the node_modules and build code needed to run the application within a custom user with restricted access.

The example contains a commented piece of code on how to disable telemetry as well.

This is useful for folks that are deploying to container orchestrators like ECS, Kubernetes (GKE, EKS, AKS) or Hashicorp Nomad, as well as just running a docker container in a single node in some cloud provider.
2021-02-24 00:42:15 +00:00
JJ Kasper
59d467542a v10.0.8-canary.7 2021-02-23 17:12:34 -06:00
JJ Kasper
5cf16ece71
Ensure static 500 hydrates correctly with query (#22468)
Follow-up to https://github.com/vercel/next.js/pull/22139 this ensures the default 500 error page hydrates with the correct `statusCode` prop when updating query values on the client since currently it will switch the 404 `statusCode` when one isn't present. An additional test case has been added to ensure this is handled correctly.
2021-02-23 22:15:46 +00:00
Joe Haddad
f8cd075870
chore: upgrade webpack5 (#22460)
Upgrades webpack 5 and watchpack to their latest versions.
2021-02-23 16:57:23 +00:00
Yasser A.Idrissi
4b587d34b8
fix(examples/with-three-js): Upgrade drei@2.2.21 & three@0.125.0 #22365 (#22431)
If the three dependency is upgraded to version 0.125.0 and upwards, the following errors occur:
- Compilation error: Attempted import error: 'Geometry' is not exported from 'three'.
- ReferenceError: Blob is not defined.

Solution: 
Upgrade drei to `2.2.21`.
2021-02-22 20:09:04 +00:00
JJ Kasper
435eef75e2 v10.0.8-canary.6 2021-02-22 10:57:07 -06:00
JJ Kasper
51e0752f87
Add generating static 500 status page (#22139)
This adds generating a static 500 status page when a `pages/500.js` file is added similar to how we handle generating static 404 pages when `pages/404.js` is present. This allows showing a customized error page when a 500 error occurs in an optimal way.
2021-02-22 16:29:50 +00:00
Tim Neutkens
9ab98bc956
Reduce webpack watcher aggregate timing (#22418)
Reduces the time the watcher waits for events coming in before compiling.
2021-02-22 14:06:49 +00:00
unimprobable
f9de10f64d
added port config var to migrate-db.js and .env (#22395)
Added port config variable to the migrate-db.js script and .env.local.example files. This allows users to set the port for remote databases like Digital Ocean that don't use the default port.
2021-02-22 13:32:23 +00:00
Ikko Ashimine
85f7efaf1f
chore: fix typo in web.js (#22150)
hte -> the
2021-02-21 22:54:32 +00:00
Lee Robinson
fea5c18132
Update docs. (#22358) 2021-02-20 00:49:41 +00:00
Denise Yu
dd7413d0ea
Fix issue templates (#22349)
This PR fixes the issue templates!

Details: https://gh-community.github.io/issue-template-feedback/changes
2021-02-19 21:38:29 +00:00
Vitali Zaidman
8cda6b41b1
improved the example on how to use WDYR with the latest next.js (#21651)
also updated the readme
2021-02-19 16:41:56 +00:00
Tim Neutkens
76e2bb57ad v10.0.8-canary.5 2021-02-19 11:11:15 +01:00
Tim Neutkens
3cef2e10ed
Delay server compilation until client compilation is done in development (#22187)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-02-19 11:10:19 +01:00
Rokas Simkus
3c82d05aa6
Fix/Update (with-chakra-ui-typescript) dependencies (#22328)
## Issue
![image](https://user-images.githubusercontent.com/20374864/108486250-8e272600-72a6-11eb-9bb6-0d2a3d76ccdc.png)

## Changes

- Fix framer-motion dependency
- Update dependencies to the latest versions
2021-02-19 09:47:28 +00:00
Joe Haddad
ef666f2e9a
v10.0.8-canary.4 2021-02-18 23:54:40 -05:00
JJ Kasper
9793e9004f
Add isPreview field to router (#21638)
This adds an `isPreview` field to the `next/router` to allow detecting when in preview mode. 

Closes: https://github.com/vercel/next.js/issues/14903
2021-02-18 18:34:33 +00:00
JJ Kasper
12cd2f9f11 v10.0.8-canary.3 2021-02-18 10:38:42 -06:00
Balázs Orbán
6af69793aa
Point to official next-auth example (#22282)
We would like to maintain a single `next-auth` example under our organization. This PR points readers of the Next.js docs to our repository, instead of `with-next-auth`

Also, as @kriscarle pointed out in https://github.com/nextauthjs/next-auth/issues/1132#issuecomment-772375650, we should maybe only maintain a single example to be able to keep it up-to-date more easily.
2021-02-18 15:39:38 +00:00
Michael McQuade
5032dd926a
Change zeit fetch to vercel fetch (#21913)
This PR does the following:

- Update documentation referencing @zeit/fetch to @vercel/fetch
- Switch packages @zeit/fetch to @vercel/fetch
- ~~Fix `browser.js` to actually use @vercel/fetch, it was only using unfetch directly before~~
- Update React to 17 
- Change folder name and package name
2021-02-18 15:09:52 +00:00
Joe Haddad
4335237aad
v10.0.8-canary.2 2021-02-18 10:03:36 -05:00
Maximilian Grundke
c11716703b
Fix typo in German translation (#22291)
Fixes a small typo in the with-rosetta-i18n example.
2021-02-18 11:00:20 +00:00
Joe Haddad
99a4ea6e9a
feat(next/image): remove sharp for wasm variant (#22253)
This pull request removes the native `sharp` dependency (which doesn't work on some Linux variants, nor **M1 Mac**) and replaces it with a wasm equivalent.

It also reduces Next.js' installed size by 27.3 MB.

The code is adapted from the [Squoosh CLI](https://github.com/GoogleChromeLabs/squoosh).

This PR still supports:

- Rotation normalization
- Resizing
- PNG
- JPEG
- Webp

However, it (temporarily) removes support for:
- Resizing Gifs
- Resizing Tiff

(these formats still get served and rendered correctly by the image component)

---

Fixes #20456
Closes #20738
Closes #21762
2021-02-18 10:23:24 +00:00
JJ Kasper
62803a9d40 v10.0.8-canary.1 2021-02-17 17:08:28 -06:00
Janicklas Ralph
cf6bc446ea
Experimental feature - fix optimizeCss flag for serverless deployments (#21790) 2021-02-17 22:52:43 +00:00
Mike Jerome
1c3ac0e3eb
Document scroll option for router.push (#22275)
Clarify in the docs that scroll is an option for router.push() and it defaults to true.
2021-02-17 16:02:18 +00:00
Dale Bustad
1433f7aa96
Update CODEOWNERS (#22232) 2021-02-16 17:10:40 -06:00
Ségolène Alquier
e917687773
[examples] Replace the GA_TRACKING_ID string with env variable (#21817) 2021-02-16 10:25:09 -06:00
Tim Neutkens
c64005ffd5 v10.0.8-canary.0 2021-02-16 09:57:24 +01:00
Kristoffer K
89edd34ff8
fix: register webpack hook earlier and use absolute paths (#21877) 2021-02-16 09:51:52 +01:00
Joe Palmieri
26dffdcbf5
Update emotion example package names in readme (#22144)
The links for `emotion` and `emotion-server` in the emotion example's readme were 404ing.

After going to Emotion's repo, I noticed [the packages were renamed](https://github.com/emotion-js/emotion/issues/1635).

This PR updates the links: `emotion` -> `emotion/css` and `emotion-server` -> `emotion/server`
2021-02-16 08:45:13 +00:00
Davi Mello
e2f700fd61
Fixing grammar (#22201)
Where it reads "We start of..." should be "We start off..".
2021-02-16 08:38:26 +00:00
Rishabh Poddar
f6e2b06cdf
Add Supertokens example (#21384) 2021-02-15 15:41:45 -06:00
Joe Haddad
80c9522750
v10.0.7 2021-02-15 15:39:02 -05:00
Tim Neutkens
57ed93bc5e v10.0.7-canary.8 2021-02-12 14:25:43 +01:00
matamatanot
b3aa1d14ff
Upgrade to lerna 4 (#22039)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-02-12 13:34:25 +01:00
Tim Neutkens
83657b6bce
Check if parentspan is provided in profiler (#22061)
Co-authored-by: Dale Bustad <dale@divmain.com>
2021-02-12 11:17:38 +01:00
Dale Bustad
5c24670227
Add Zipkin trace capturing with output to JSON. (#22106)
@timneutkens this adds a trace capturing script alongside the other tracing sundry.  This will be utilized by the performance automation.  Additionally, its nice to have an option other than running the ZipKin JAR to get at the raw data.
2021-02-12 09:10:07 +00:00