- 05 Aug, 2020 19 commits
-
-
Joe Haddad authored
-
Mikkel Laursen authored
-
Jan Potoms authored
-
Jan Potoms authored
Fixes https://github.com/vercel/next.js/issues/15639 Fixes https://github.com/vercel/next.js/issues/15820 To Do: - [x] Doesn't work with `basePath` yet
-
Alex Castle authored
This PR adds a second experimental post-processing step for the framework introduced by @prateekbh in #14746. The image post-processing step scans the rendered document for the first few images and uses a simple heuristic to determine if the images should be automatically preloaded. Analysis of quite a few production Next apps has shown that a lot of sites are taking a substantial hit to their [LCP](https://web.dev/lcp/) score because an image that's part of the "hero" element on the page is not preloaded and is getting downloaded with lower priority than the JavaScript bundles. This post-processor should automatically fix that for a lot of sites, without causing any real performance effects in cases where it fails to identify the hero image. This feature is behind an experimental flag, and will be subject to quite a bit of experimentation and tweaking before it's ready to be made a default setting.
-
Sigurður Gunnar Njálsson authored
Fixes https://github.com/vercel/next.js/issues/15906 This should solve https://github.com/vercel/next.js/issues/15906. It simply removes a block that states runtime configuration for serverless builds are not supported.
-
Jack Clackett authored
-
Aleksander authored
-
Steven authored
Follow up to #15899 since it didn't solve the [concurrency limit](https://docs.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits) issue. It seems that the job is queued prior to the `if` statement being evaluated so we must use a separate workflow to listen for push events and filter prior to the job being queued.
-
nirtamir2 authored
-
Riccardo Di Maio authored
Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Rounak Agarwal authored
Co-authored-by:
Tim Neutkens <tim@timneutkens.nl> Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Steven authored
Only run macOS tests on canary to avoid queued jobs due to [concurrency limit](https://docs.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits). Follow up to #15366
-
Darsh Patel authored
removed the dotenv dependency in favor of Next.js environment support: #15225 The example seems to work with no other changes required 
-
Joseph Knowles authored
Fix with-firebase-authentication example: Update the cookie when ID token refreshes on client (#15628) I noticed a problem with the example - when you leave it logged in for more than an hour it breaks. The example API call starts to fail with `auth/id-token-expired`. Looking at the code I saw that we never update the id token after signing in, but firebase automatically updates it every hour, meaning our `verifyIdToken` fails after an hour. So I used the `onIdTokenChanged` function from firebase to update the cookie every time the id token changes. I'm open to suggestions on refactoring the code I've added.
-
Amith Mihiranga authored
Correct the error handling for fetch API to check if the status is ok or not FIxes #15808
-
Flavian Desverne authored
## Motivation As Graphcool is being shutdown, we replaced all the graphcool api endpoints with some handcrafted APIs using Prisma & Nexus, that can be found here https://github.com/prisma-labs/nextjs-graphql-api-examples. These GraphQL endpoints are now deployed to Vercel. ## Notes - I couldn't get the reason-relay example to run. Given that the relay endpoint works on the other relay example, I don't see any reason why it wouldn't work on that one - The `with-apollo` example is buggy when creating some posts, but nothing related to the switch of the api endpoint as it was already buggy before. I suspect the `concatPagination` strategy to be the cause of that bug, but I couldn't figure it out. Fixes #14780
-
Darsh Patel authored
-
Joe Haddad authored
-
- 04 Aug, 2020 16 commits
-
-
Joe Haddad authored
Next.js plugins like `@next/mdx` inject additional webpack loaders to compile files, but they omit the necessary loader for Fast Refresh to work. Instead of making these files deopt out of Fast Refresh, we can automatically detect and inject the loader in these cases. Fixes #13574
-
agstover authored
Co-authored-by:Joe Haddad <joe.haddad@zeit.co>
-
Joe Haddad authored
-
Jan Potoms authored
-
jiangtao authored
fixed issue with runtime-config returning undefined when building or in a development environment (#15777) fix https://github.com/vercel/next.js/issues/7713#issuecomment-643632270
-
matamatanot authored
Remove the dotenv dependency from all examples (in favor of environment support): #15225 All variables are exposed to the client. This Example does not use firebase-admin.
-
Joe Haddad authored
By popular request, this pull request adds support for returning `fallback: 'blocking'` from `getStaticPaths`. This new mode will cause unknown paths to be rendered on-demand ("SSR") without the static (placeholder) fallback. This feature is **currently experimental and should not be used in production yet**. It's currently flagged behind `unstable_`: ``` fallback: 'unstable_blocking' ``` TODO: - [x] Next.js tests - [ ] Add Vercel support - [ ] Vercel tests --- Fixes #15637 -
Tim Neutkens authored
-
Darsh Patel authored
The icon is just something I thought might look good, can certainly be changed. I've currently added incremental static generation support Edit: Updated screenshot after 8037981  Fixes: #14204
-
Jonathan G authored
Co-authored-by:
Tim Neutkens <timneutkens@me.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Prateek Bhatnagar authored
- Fixes the serverless build for font optimizations
-
Kristóf Poduszló authored
Add missing nomodule polyfills and suggest using features only up to ES2019 for browser compatibility (#15772) These changes aim to resolve most of the concerns raised in #15756. It adds missing polyfills for legacy browsers up until ES2019: - Number.{parseFloat,parseInt} - ~Math.{acosh,asinh,atanh,cbrt,clz32,cosh,expm1,fround,hypot,imul,log10p,log1p,log2,sign,sinh,tanh,trunc}~ _[Removed as these are [not widely used](https://github.com/vercel/next.js/pull/15772#discussion_r463957931)]_ - While these may seem to weigh a lot, they barely add 1 kB to the resulting bundle: <img width="492" alt="gzip: 32 kB vs. 30.9 kB, Brotli: 28.8 kB vs. 27.8 kB" src="https://user-images.githubusercontent.com/14854048/89100961-1376e600-d3fc-11ea-90fd-3e6632b70220.png"> - ~Object.fromEntries~ _[Removed as [it's rarely used in user code](https://github.com/vercel/next.js/pull/15772#discussion_r463984612)]_ Also, the following features are now supported with build-time transforms: - ~`globalThis` (gets transformed into `window` in browser environments)~ _[Removed as it [could break existing applications](https://github.com/vercel/next.js/pull/15772#discussion_r463956269)]_ - `export * as ns from 'module'` The suggested TypeScript library version has been set to ES2018, so the features below become unavailable in type-checked files (they're not evenly supported by module-compatible browsers, either): - Object.fromEntries - String.prototype.matchAll - String.prototype.replaceAll - Promise.any + AggregateError - WeakRef As for the `import.meta` support, [webpack v5 seems to fix that](https://github.com/webpack/webpack/pull/11075), so it should eventually become an issue of the past. --- Fixes #15756 -
Joe Haddad authored
-
Joe Haddad authored
-
Joe Haddad authored
-
Joe Haddad authored
Fixes #15737
-
- 03 Aug, 2020 5 commits
-
-
Marc authored
I was referencing the with-passport example and found a minor syntax error:\ The login and signup page both used `event.preventDefault()` on the submit handlers, whereby the correct reference to the event is `e` as defined within the `handleSubmit` functions. Additionally used the chance to bump npm packages, the largest bump being swr to the latest version: 0.3.0 ### Summary of all Changes made: * Fixed syntax error on login page * Fixed syntax error on signup page * Bumped cookie to 0.4.1 * Bumped next-connect to 0.8.1 * Bumped swr to 0.3.0
-
Tim Neutkens authored
Same as #15483 but couldn't push to it --- Closes #15483 Fixes #15828
-
Jan Potoms authored
In terms of url rewriting, `trailingSlash` supports everything `exportTrailingSlash` does. We can just share all other code paths and deprecate `exportTrailingSlash`. This PR shows a deprecation warning when `exportTrailingSlash` is used. Also fixes https://github.com/vercel/next.js/issues/15774 We can update the tests now or later. (I kept them the same to prove it's non-breaking) To do: - [x] Do we want to keep this? => nope https://github.com/vercel/next.js/blob/841d4efc517a379d8947f491e3c6a1c4784bbccf/packages/next/next-server/lib/router/router.ts#L329 - [x] I kept `exportTrailingSlash` here. Do we want to rename that as well? => nope https://github.com/vercel/next.js/blob/2d9d649d492b77adeddea0242ab6b7fe73d18079/packages/next/build/index.ts#L959
-
Mehedi Hassan authored
Following up from #14830, this PR adds a new page to the docs for Create Next App. The content is identical to the README created as part of #14830. Also added a link on the main `getting-started` page to the new docs for Create Next App to help users find more info on Create Next App if needed. I'm unsure as to whether the content for the documentation needs to be different from the one I wrote for the README. Please let me know if that's the case, and I will be happy to tweak the structure.
-
Kim T authored
Fixes #15802 Added Params type to prevent typescript error during build step
-