Commit graph

7765 commits

Author SHA1 Message Date
Tim Neutkens
56b149f7be
Add experimental per-page option to disable JS preloads (#21329)
As discussed with @csswizardry. This is a temporary option in case you know the preloads are not needed. It will likely be a default once the ScriptLoader work from @janicklas-ralph has been proven in partner apps and landed.

```js
// pages/index.js
export const config = {
  unstable_JsPreload: false
}
```
2021-01-19 19:38:15 +00:00
Tobias Koppers
11900431fa
upgrade webpack 5 for empty entrypoint fix (#21353)
fixes a problem where entrypoints are nearly empty.
2021-01-19 19:15:45 +00:00
Bernd Artmüller
72ce099106
Fix splitting page path by buildId (#19901)
Running next.js in `development` causes issues when having pages named "development" or "developments",... as `this.buildId` = `development`

Fixes: https://github.com/vercel/next.js/issues/19520
2021-01-19 18:27:28 +00:00
Joe Haddad
d33aad7815
chore: upgrade chokidar to fix install warning (#21343)
To resolve:
```
warning next > chokidar > fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
```
2021-01-19 17:02:32 +00:00
Joe Haddad
02aa7b28da
ci: stabilize Window CI (#21344)
This skips a test suite that always flakes on Windows due to `http-proxy` <> Windows interop issues.
2021-01-19 16:04:27 +00:00
Thor 雷神 Schaeff
0bd175264b
Update Supabase example. (#21200) 2021-01-19 07:10:56 -06:00
Tim Neutkens
85624d6164 Remove console.log 2021-01-19 09:44:03 +01:00
Luis Alvarez D
e28fd50441
Include utm_source on example links to vercel.com (#21305) 2021-01-19 07:28:54 +00:00
Joe Haddad
cfae5c6c32
fix: lint 2021-01-19 00:26:53 -05:00
Lee Robinson
5d98874e8f
Add guide "Migrating from Create React App" (#21212) 2021-01-18 17:37:32 -06:00
Tim Neutkens
f8fecf57c3
Fix webpack 5 warning + disabling of profiling (#21276)
Noticed that there was a specific warning when using webpack 5.
2021-01-18 16:38:00 +00:00
Tim Neutkens
c5b5c43e3d
Add codemod for files that do not support the new React JSX transform (#21281)
Previously our automatic React injection approach injected `import React from 'react'` automatically whenever JSX was detected. The new official JSX transform solves this by enforcing importing `React` when it is used.

This codemod automatically converted files that are using a "global React variable" to use `import React from 'react'`
2021-01-18 15:17:10 +00:00
kaykdm
699a7aeaaa
Move hydration mis-match test suite (#21264)
In this [PR](https://github.com/vercel/next.js/pull/21065), it was suggested to move the test suite, but it was merged before fixing.
This is the fix for that, moving link-with-hash test suite to client-navigation suite

detail: https://github.com/vercel/next.js/pull/21065/files#r558425551
2021-01-18 04:05:41 +00:00
Tim Neutkens
f534a5cad2 v10.0.6-canary.4 2021-01-17 20:13:41 +01:00
Tobias Koppers
b02df3f487
improve splitChunks config for webpack 5 (#21208) 2021-01-17 20:05:47 +01:00
Tobias Koppers
9c4d368459
use webpack resolve api to resolve in externals config (#21205) 2021-01-17 20:02:20 +01:00
Sumanth Ratna
f40a41cd6d
Update chromedriver brew install instructions in contributing doc (#21251)
`brew cask install` was recently deprecated in favor of `brew install --cask`
2021-01-17 18:55:44 +00:00
Peter Kellner
8e88282da5
Small spelling fix (#21246) 2021-01-17 16:50:46 +01:00
JJ Kasper
cfa9326c63
Minimal mode normalizing (#21083)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-16 16:46:21 +01:00
kaykdm
cdab7bf831
fix hydration mismatch on href for url with anchor refs (#21065)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-15 17:53:10 +01:00
Joe Haddad
ceef1566c3
v10.0.6-canary.3 2021-01-15 11:49:31 -05:00
Joe Haddad
54bee4fb4d
fix: resolve two peer dep install warnings (#21176)
This removes the peer dep on `webpack` from `react-dev-overlay`, as it is for types only.

This makes the peer dep on `webpack` optional for `react-refresh-utils`, as you can provide webpack via the constructor (how Next.js does).
2021-01-15 16:39:49 +00:00
Joe Haddad
598997f038
fix: lint 2021-01-15 10:24:16 -05:00
Tim Neutkens
8b02c1ba52
Update 1.bug_report.yml 2021-01-15 11:04:57 +01:00
Ben Botvinick
cf916f9906
Add useCreateIndex to mongoose connection options (#21145)
To prevent `DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.`
2021-01-15 09:57:52 +01:00
Joe Haddad
dd2218adc9
v10.0.6-canary.2 2021-01-15 01:32:14 -05:00
Gerald Monaco
358d57dbae
Fix tests for React 16 + Webpack 4/5 (#21146) 2021-01-15 01:31:28 -05:00
Gerald Monaco
cd5ea7db1f
Bump minimum suggested React version (#21046)
* Upgrade React version warning

* Fix font/stylesheet plugin

* Fix size-limit tests

* Fix build-output test

* Add tests for React 16

* Fix react-dom version
2021-01-14 22:29:57 -05:00
Guy Bedford
005a8abe39
feat: Webpack loader inlining (#21127)
This picks up on the inlining work in https://github.com/vercel/next.js/pull/20598 to also include webpack loader inlining optimizations.

This includes:
* The dependencies of sass-loader
* resolve-url-loader

And for added benefit:
* babel-plugin-transform-define
* babel-plugin-transform-react-remove-prop-types

style-loader and css-loader didn't inline easily. Perhaps we can come back to these ones.
2021-01-15 01:51:45 +00:00
Lee Robinson
dc87a8436b
Update redirected or broken Vercel docs links. (#21119) 2021-01-14 15:37:21 +00:00
Joe Haddad
60a896f833
v10.0.6-canary.1 2021-01-14 10:18:03 -05:00
Ramiro Silveyra d'Avila
d72b2d6e36
fix: webpack 5 and worker-loader support (#21050)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2021-01-14 01:48:49 -05:00
François Billioud
9efe8eb019
Fix "rule.test.test is not a function" in @next/plugin-storybook (#21032)
Rookie mistake 😉
2021-01-14 03:14:57 +00:00
Ludovico Fischer
406c996189
fix: bump node-sass peer dependency (#21084)
Get rid of the unmet peer dependency warning when installing
a next.js project wtih node-sass 5.

node-sass 5 is the currently maintained version and removes
support one deprecated API and Node.js versions that Next.js does
not support either. Next.js uses node-sass 5 in devDependencies.

node-sass changelog: https://github.com/sass/node-sass/releases

On the other hand, as the docs encourage the sass package instead of node-sass,
(see errors/duplicate-sass.md)
I have updated examples which used node-sass 4 to the latest sass instead.
2021-01-14 02:26:01 +00:00
Guy Bedford
bddb02286f
feat: webpack inlining with configuration for v4 / v5 (#20598) 2021-01-13 20:59:08 -05:00
kaykdm
e1184fb060
Fix image cache for vector and animated images (#20480)
Fixes: https://github.com/vercel/next.js/issues/19100
> According to https://nextjs.org/docs/basic-features/image-optimization#caching Next.js populates a cache dir when using the new <Image /> component. This is not the case when using SVG files. This results in a performance penalty.

I created a function for writing images to cache directory (`wrirteToCacheDir`) and it is called for all images.
However, vector and animated images are not optimized before writing them to cache dir

Related to #18179
2021-01-13 18:06:04 +00:00
Ari Freyr Asgeirsson
69ff95f50e
Wrong index path revalidation timer (#20818)
Hello friends

Ran into this bug on our production site, prerenderManifest stores revalidation info for the index as `"/": { .. }`, but the code tries to access this information as `"/index"`.

This leads to our index page always having s-max-age: 1
2021-01-13 16:15:11 +00:00
Janicklas Ralph
e6e402e486
Font optimization - remove warning message (#20874) 2021-01-13 15:54:31 +00:00
JJ Kasper
417a712066
Update next/image test (#20986)
This ensures the page has transitioned fully before testing which should resolve the random failure seen in a couple of runs. 
 
x-ref: https://github.com/vercel/next.js/pull/20918#issuecomment-758155230
2021-01-13 15:05:08 +00:00
Volodymyr Klymenko
334ce64cd7
Add missing word to Data Fetching docs (#21018)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-13 15:35:32 +01:00
Lalit
a6ff7bd661
Update a link (#20999)
Update link from https://swr.now.sh to https://swr.vercel.app
2021-01-13 14:22:29 +00:00
Lee Robinson
92637a9b08
Update with-polyfills example. (#20996)
From https://github.com/vercel/next.js/discussions/20992.
2021-01-13 14:00:50 +00:00
Baheya Khalifa
f9b7a391b7
Fix teeny tiny typo (#21005) 2021-01-12 15:05:32 +00:00
Lee Robinson
e30c5a8eb8
Add "Migrating from React Router" docs. (#20982)
Please let me know if anything is missing from this document 😄
2021-01-12 01:44:14 +00:00
JJ Kasper
9caca2784c
Add proper error when conflicting paths are detected (#20918)
This helps catch conflicting paths returned from `getStaticPaths` with a friendly error

<details>

<summary>
Preview of error
</summary>


<img width="962" alt="Screen Shot 2021-01-08 at 5 03 04 PM" src="https://user-images.githubusercontent.com/22380829/104074719-6e481100-51d6-11eb-9397-938aee3ae30b.png">
<img width="962" alt="Screen Shot 2021-01-08 at 5 03 41 PM" src="https://user-images.githubusercontent.com/22380829/104074722-6f793e00-51d6-11eb-90f6-7cdf9882bf00.png">

</details>




Closes: https://github.com/vercel/next.js/issues/19527
2021-01-11 20:50:17 +00:00
JJ Kasper
e0a44d98ef
Skip GitHub actions tests for irrelevant changes (#20867)
* Skip GitHub actions tests for irrelevant changes

* add docs lint step

* Add lint-no-typescript

* Update docs lint

* Skip at the job level

* Update steps

* remove un-needed dep

* Update compare branch

* log remotes

* output to stderr

* fetch origin

* Update fetch

* update diffing

* Update command handling

* test output

* Update check

* Log output

* Update outputs

* Add id for build job

* Update output

* Update precompiled

* remove testing check
2021-01-11 13:24:17 -06:00
Joe Haddad
1a1c7c980f
v10.0.6-canary.0 2021-01-11 12:32:53 -05:00
Joe Haddad
d0e28549af
feat(css): add strictPostcssConfiguration flag (#20914)
This pull request adds `future.strictPostcssConfiguration`, allowing users to opt-into the more strict PostCSS configuration loading.

This stricter PostCSS configuration loading ensures that CSS can be cached across builds.
2021-01-11 17:19:56 +00:00
Spencer Elliott
16ff4390a0
Add pnpm integration test (#17882) 2021-01-11 17:50:12 +01:00
Kristoffer K
1c75bf789b
perf(next): use require.resolve instead of resolve (#19518)
**What's the problem this PR addresses?**

- ~~https://github.com/vercel/next.js/pull/18768 started to ncc babel and thus it's version of resolve which breaks PnP support~~
Babel replaced `resolve` with the builtin `require.resolve` and a polyfill for older node versions in https://github.com/babel/babel/pull/12439 which was upgraded in https://github.com/vercel/next.js/pull/20586
- `next` unnecessarily bundles the `resolve` package when `require.resolve` is builtin and can do the same job

**How did you fix it?**

- ~~Avoid running `resolve` through ncc~~
Added a test for https://github.com/vercel/next.js/issues/19334 (closes https://github.com/vercel/next.js/issues/19334)
- Replace `resolve` with `require.resolve`
2021-01-11 14:43:08 +00:00