- 05 6月, 2020 4 次提交
-
-
由 Jan Potoms 提交于
Disambiguate between pages/index.js and pages/index/index.js so that they resolve differently. It all started with a bug in pagesmanifest that propagated throughout the codebase. After fixing pagesmanifest I was able to remove a few hacks here and there and more logic is shared now. especially the logic that resolves an entrypoint back into a route path. To sum up what happened: - `getRouteFromEntrypoint` is the inverse operation of `getPageFile` that's under `pages/_document.tsx` - `denormalizePagePath` is the inverse operation of `normalizePagePath`. Everything is refactored in terms of these operations, that makes their behavior uniform and easier to update/patch in a central place. Before there were subtle differences between those that made `index/index.js` hard to handle. Some potential follow up on this PR: - [`hot-reloader`](https://github.com/vercel/next.js/pull/13699/files#diff-6161346d2c5f4b7abc87059d8768c44bR207) still has one place that does very similar behavior to `getRouteFromEntrypoint`. It can probably be rewritten in terms of `getRouteFromEntrypoint`. - There are a few places where `denormalizePagePath(normalizePagePath(...))` is happening. This is a sign that `normalizePagePath` is doing some validation that is independent of its rewriting logic. That should probably be factored out in its own function. after that I should probably investigate whether `normalizePagePath` is even still needed at all. - a lot of code is doing `.replace(/\\/g, '')`. If wanted, that could be replaced with `normalizePathSep`. - It looks to me like some logic that's spread across the project can be centralized in 4 functions - `getRouteFromEntrypoint` (part of this PR) - its inverse `getEntrypointFromRoute` (already exists in `_document.tsx` as `getPageFile`) - `getRouteFromPageFile` - its inverse `getPageFileFromRoute` (already exists as `findPageFile ` in `server/lib/find-page-file.ts`) It could be beneficial to structure the code to keep these fuctionalities close together and name them similarly. - revise `index.amp` handling in pagesmanifest. I left it alone in this PR to keep it scoped, but it may be broken wrt nested index files as well. It might even make sense to reshape the pagesmanifest altogether to handle html/json/amp/... better
-
由 Vincent Voyer 提交于
-
由 Joe Haddad 提交于
The current [with-polyfills](https://github.com/vercel/next.js/blob/canary/examples/with-polyfills/) example is not the suggested way to add polyfills and is known to cause issues with bundling. The proper way to load polyfills is to include them as the first line in `pages/_app.js`, which I've updated the docs to say.
-
由 Todor Totev 提交于
Closes [7882](https://github.com/vercel/next.js/issues/7882). Created as requested by @timneutkens I'm unsure if that's exactly what you wanted, so let me know what you want me to change and I'll do it asap.
-
- 04 6月, 2020 7 次提交
-
-
由 Timothy 提交于
This pull request renames various instances of `now` to `vercel` etc. in order to match content that's being updated on the Vercel platform.
-
由 Vincent Voyer 提交于
When reading "In order to expose a variable to the browser you can prefix the variable with NEXT_PUBLIC_. For example:" I thought that I could maybe use something else than NEXT_PUBLIC_. I guess "have to" or similar would be better here, let me know
-
由 Shu Uesugi 提交于
[ch1981] Add the “Supported Browsers and Features” page. The content is taken mostly from the blog posts: [9.4](https://nextjs.org/blog/next-9-4), [9.3](https://nextjs.org/blog/next-9-3), and [9.1.7](https://nextjs.org/blog/next-9-1-7). - This page is added under “Basic Features” on the sidebar. - It still links to `with-polyfills` example, but [this example was updated recently](https://github.com/vercel/next.js/pull/11169/commits/04fbe0b7563d52d5feaf776cdc28b34edbb3a813). I simplified the README. - Removed the FAQ section on supported browsers. - On ["Customizing Babel Config"](https://nextjs.org/docs/advanced-features/customizing-babel-config), remove the list of presets which were outdated and instead link to [the preset file](https://github.com/vercel/next.js/blob/canary/packages/next/build/babel/preset.ts) so it’s always up to date.
-
由 Giulio Fagioli 提交于
Prefixed variables name with NEXT_PUBLIC_. Solving #13585 issue related to get undefined from process.env.VARNAME inside .env* files. I'm not secure if SESSION_SECRET_* need the prefix.
-
由 Todor Totev 提交于
Closes [13730](https://github.com/vercel/next.js/issues/13730) Brought back the ref implementation. Added another component that uses just the videojs-youtube package
-
由 Filipe Marins 提交于
The tests was with description changed
-
由 James Mosier 提交于
Added new documentation for React Strict mode under the `next.config.js` doc level. Closes #13713
-
- 03 6月, 2020 14 次提交
-
-
由 Tim Neutkens 提交于
Co-authored-by: NJoe Haddad <joe.haddad@zeit.co>
-
由 Todor Totev 提交于
Related to [11014](https://github.com/vercel/next.js/issues/11014) 1. Moved the reducer into the store and created new store file 2. The example was using a server that was no longer available, now it uses JSON placeholder instead. 3. Moved from getInitialProps to getStaticProps 4. Refactored all the classes to functional components, using the new redux hooks API. 5. Upgraded all the packages and using custom redux wrapper instead of next-redux-wrapper, which I have removed from the example. 6. Upgraded all the other packages. Please, let me know if I should change anything.
-
由 Todor Totev 提交于
**First, apologies for a second PR on the same issue but I was working on this already so I thought I'd push it and let you decide which you want to merge.** The PR is related to [13466](https://github.com/vercel/next.js/issues/13466). Based on my research, the error happens if the options are empty, null, or undefined. That's why I have decided that the most proper check would be using the! post-fix expression operator may assert that its operand is non-null and non-undefined. ``if (options == null)`` (Optional) I have also added a warning, which warns the user if the passed "dev" variable is not a boolean. It's my first PR on the "packages" part of the repo so I'd be glad to receive all kinds of critics. If you want me to change or remove anything, I'm open to suggestions. --- Fixes #13466
-
由 Joe Haddad 提交于
`JAMstack` is now `Jamstack`.
-
由 Tyler Evans 提交于
Took me a while to figure out why the simple data fetching examples weren't working in my project, which I based off this template. Here's the fix.
-
由 Joe Haddad 提交于
-
由 Jefferson Bledsoe 提交于
The [docs for customising the PostCSS config](https://nextjs.org/docs/advanced-features/customizing-postcss-config) warn the user they will need to manually install any dependencies that Next.JS will implicitly use if the config is not overridden. `postcss-preset-env` is missing from the install command.
-
由 Tim Neutkens 提交于
Prepares for the upgrade to webpack 5
-
由 Joe Haddad 提交于
Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
由 Joe Haddad 提交于
-
由 Luis Alvarez D 提交于
This was a change that I forgot to push into the Agility CMS example PR, adding it now.
-
由 Joe Haddad 提交于
-
由 Joe Haddad 提交于
Removes some dangling references to non-existent experimental options.
-
由 Joe Haddad 提交于
This skips reading from the file system because the `sourcesContent` can be used to access the source code. I've completely removed the filesystem fallback, because it's probably not our code that'd be syntax highlighted anyway.
-
- 02 6月, 2020 15 次提交
-
-
由 Joe Haddad 提交于
This removes remaining references to `granularChunks` in configs, error messages, and comments. Also removed the `process.env.__NEXT_GRANULAR_CHUNKS` value. --- Follow up to: https://github.com/vercel/next.js/pull/13663
-
由 Tim Neutkens 提交于
The option was released a few months ago so we can get rid of this option.
-
由 Tim Neutkens 提交于
https://twitter.com/vercel/status/1267650234236252161 The variables for the launchEditor feature were kept consistent with Create React App so it's probably a good idea for them to change them too: https://github.com/facebook/create-react-app/search?q=WINDOWS_FILE_NAME_WHITELIST Prior discussions on this topic: - https://github.com/hashicorp/consul/issues/7901 - https://github.com/styled-system/styled-system/issues/391 - https://github.com/go-sql-driver/mysql/pull/1116 - https://github.com/lagom/lagom/issues/2532 - https://github.com/grafana/grafana/issues/18841
-
由 James Vidler 提交于
-
由 Kirill Konshin 提交于
Follow up for #11802 Makes sure app is not opted out of Automatic Static Optimization.
-
由 Shu Uesugi 提交于
* Strapi Example * Fix og image URL * Remove next.config.js * Apply updates * Remove API_URL * Bugfixes * Finish Strapi README * Deploy Strapi * Add strapi examples * now → vercel [ch1796] * Use npx * Minor readme update * Prettier fix Co-authored-by: NLuis Alvarez <luis@vercel.com> Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
由 Joe Haddad 提交于
-
由 Joe Haddad 提交于
In serverless mode, it's best practice to propagate an unhandled error so that the function is disposed instead of recycled. This helps fix the "bad state" problem.
-
由 Joe Haddad 提交于
This feature is still experimental.
-
由 Luis Alvarez D 提交于
* Added most of the stuff * Updated pages * Removed unrequired deps * API fixes * Fixes fixes and updated readme * Updated og image * Added demo and links to example * Updated packages * update name. bump dependencies * Renamed .env.example to .env.local.example * Added node_modules to .gitignore * use recommended config * enable absolute import/alias support * remove jsconfig.json * allow HTML entities in post titles * add underline to content links * add basic ul & ol styles * add code block styles * add basic text alignment * add basic image alignment styles * adjust pre font-size and figcaption * indent ul,ol lists to line up with grid * add basic button styles * add basic file styles * add basic blockquote style * add basic audio styles * add h4 and enhance blockquote styles * add basic cover block styles * add basic verse styles * add basic two-column block styles * add tags * add categories * Only ignore .vercel The rest is injected by create-next-app * now → vercel * npm init → npx * Wordsmith * Wordsmith * Wordsmith * Wordsmith * Improve issue link * Wordsmith Co-authored-by: NGreg Rickaby <greg@gregrickaby.com> Co-authored-by: NJoe Haddad <joe.haddad@zeit.co> Co-authored-by: NShu Uesugi <shu@chibicode.com> Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
由 Tim Neutkens 提交于
Was going through _document and noticed some variable shadowing going on. Added a rule for it to our eslint configuration and went through all warnings with @Timer.
-
由 Rafael Almeida 提交于
The motivation for this PR is well explained here: https://github.com/facebook/create-react-app/pull/8177 I can expand it to the other examples too if you agree with the change
-
由 Tim Neutkens 提交于
Follow-up to #12218, missed this bit of code.
-
由 Shu Uesugi 提交于
This undoes https://github.com/vercel/next.js/pull/13138 as the rename is done.
-
由 Todor Totev 提交于
Closes #12664 Closes #13604 The culprit was not only changing the library directory, but also having the icons version past 4.0.6. Also, the components which used the library had to be adjusted according to the new changes. Confirmed that it works both in production and development. Confirmed that it builds on dev and production. ![Alt Text](https://media.giphy.com/media/dZ46aA1Rs7Oi1wSQKU/giphy.gif)
-