Commit graph

5347 commits

Author SHA1 Message Date
Tim Neutkens
541cd01b22
Add test for single alias (#11296) 2020-03-23 12:30:42 -04:00
Joe Haddad
c68de947a4
v9.3.2-canary.2 2020-03-23 11:20:28 -04:00
Tim Neutkens
7fce52b905
Add support for paths in tsconfig.json and jsconfig.json (#11293)
* Add support for tsconfig/json `paths` option

* Add tests for paths in tsconfig.json

* Don't apply aliases when paths is empty

* Clean up unused methods and link to TypeScript license

* Add tests for jsconfig

* Put feature under an experimental flag

* Enable to see if tests pass

* Update types

* Add feature under an experimental flag
2020-03-23 10:45:51 -04:00
Dulmandakh
d3fb262958
remove mkdirp, bump fs-extra to 9.0.0 (#11251)
* bump mkdirp to 1.0.3, which support promise

* fix mkdirp in spr-cache.ts

* bump fs-extra to 9.0.0

* remove mkdirp
2020-03-21 17:02:05 +01:00
Greg Rickaby
cadc950e2d
docs(example): Load basic-css example on codesandbox (#11227)
* Load basic-css example on codesandbox

* Moved link

Co-authored-by: Luis Alvarez <luis@zeit.co>
Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-03-20 15:39:36 -05:00
julianbenegas
f1944cad88
With Firebase Client-Side example (#11053)
* initialized example

* Import from "firebase/app"

to get only needed firebase modules

* credentials as env variables
Also, initialize app in a separate file. Much cleaner.

* Update examples/with-firebase-client-side/package.json

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>

* fixed environment variables and added .env.example

* added dotenv

* Updated readme

* Renamed example in the readme

* Renamed example files

* Updated title

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-03-20 15:38:28 -05:00
Martín Granados García
8724b3cd2f
Updated Api Routes Middleware example to use getServerSideProps (#11128) 2020-03-20 12:47:37 -05:00
Tim Neutkens
f25f9b8753 v9.3.2-canary.1 2020-03-20 13:07:04 +01:00
Tim Neutkens
b9320a8f70
Update wording of new data fetching methods recommendation (#11221) 2020-03-20 12:57:17 +01:00
Avi Aryan
920bf76579
Fix with-firebase-cloud-messaging example setup code (#10686) 2020-03-20 10:15:45 +01:00
Timon Borter
c25447ccbb
update mocha example with yml configuration. (#11214) 2020-03-20 10:13:57 +01:00
JJ Kasper
c14d983d54
Ensure hybrid AMP works correctly with SSG (#11205)
* Ensure hybrid AMP works correctly with SSG

* Strip AMP from query when not needed
2020-03-20 09:46:52 +01:00
Shu Uesugi
a63ac3e715
CMS TakeShape Example (#11038)
* TakeShape Example

* Fix preview logic

* Update README

* Fix broken link

* Be more clear with the relationship field

* Use latest next.js for cms examples

* Only show enabled items

* Ignore current slug

* Fix queries

* Add takeshape demo

* Added link to blog-starter

Co-authored-by: Luis Alvarez D <luis@zeit.co>
2020-03-19 17:30:37 -05:00
Luis Alvarez D
7d42b07b79
[Example] with-passport (#10529)
* Added basic layout with login page

* Updated styles

* Added form component

* Added signup page

* Added login/signup API endpoints

* Bug fixes

* Set the cookie

* Added logout route

* Added more auth

* Updated signup

* Added profile page

* Added useUser

* Fix link

* Updated redirect path

* Renaming some files

* Added README

* Apply suggestions from Shu

Co-Authored-By: Shu Uesugi <shu@chibicode.com>

* Add useUser to the header

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-03-19 11:40:13 -05:00
Tim Neutkens
38e42cd4bb
Add support for baseUrl option in tsconfig and jsconfig (#11203)
* Add support for baseUrl option in tsconfig and jsconfig

* Move jsconfigPath

* Remove filter
2020-03-19 17:34:24 +01:00
Vincent Voyer
f0c6df42fb
docs(ssr): req is an IncomingMessage instance, not HttpRequest (#11194) 2020-03-19 11:36:09 +01:00
Prateek Bhatnagar
3907dfd60d
updating min nodejs requirement (#11181)
* updating min canary requirement

* watchpack requires 10.13.0
2020-03-19 09:25:41 +01:00
JJ Kasper
e28e8ada98
Group CSS files in shared build output separate from JS files (#11184)
* Group CSS files in shared build output separate from JS files

* Fix buildId not being replaced in shared by all
2020-03-19 09:25:10 +01:00
JJ Kasper
756b365adf
Add CMS example for Sanity (#10907)
* Add start of Sanity CMS example

* Update cover-image

* Clean up example

* Apply suggestions from code review

Co-Authored-By: Shu Uesugi <shu@chibicode.com>

* Make changes from review

* Remove extra style

* Apply suggestions from code review

Co-Authored-By: Shu Uesugi <shu@chibicode.com>

* Make tweaks for preview mode and normalize env naming

* Update viewing preview step

* Delete author.jpg

* Delete image.jpg

* Update README

* Fix environment variable names

* Project ID is needed by lambda

* Improved steps

* Fixed issue with the project URL example

* Clarify line

* Get the preview post correctly

* preview = false

* Get unique posts

* Show preview mode on index page

* typo fix and use next latest

* Added related examples section

Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-03-18 18:39:37 -05:00
Shaswat Saxena
43c11904d3
Updated with-typescript example to SSG (#11081)
* Update with-typescript example to SSG

* Fixed usage of localhost inside SSG methods

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-03-18 15:15:04 -05:00
Joe Haddad
bf93ca4af6
v9.3.2-canary.0 2020-03-18 13:00:25 -04:00
Zhe Zhang
14efae931a
[Examples] fix remark link in blog-starter's README (#11177) 2020-03-18 17:36:04 +01:00
Tim Neutkens
66e1fa154c
Add section on reading files (#11084) 2020-03-18 17:19:38 +01:00
Sebastian Benz
4b1ce16e12
upgrade @ampproject/toolbox-optimizer to 2.0.1 (#11168)
Fixes #11159
2020-03-18 14:20:29 +01:00
Tim Neutkens
1c170c946a
Remove react-ssr-prepass alias as it's not longer needed (#11170) 2020-03-18 13:47:28 +01:00
Tim Neutkens
ac34a9f960
Clean up examples directory (#11169)
* Remove outdated examples

* Remove outdated example

* Remove outdated example that doesn't show best practices

* Remove outdated example

* Remove outdated example

* Remove outdated example

* Update preact example

* Update using-router to use useRouter

* Remove outdated example

* Remove outdated example

* Remove outdated example

* Remove outdated example

* Remove outdated example

* Remove outdated example

* Combine examples

* Simplify offered examples

* Remove outdated example

* Add link to new example

* Removed outdated example

* Markdown example has been improved

* Remove example that showed bad practices

* Remove outdated example

* Update polyfills example

* Remove outdated example

* Remove outdated example

* Remove outdated example

* Removed outdated example

* Remove outdated example

* Remove outdated example

* Remove outdated example

* Remove outdated example

* Update webassembly example

* Move example
2020-03-18 13:45:31 +01:00
Tim Neutkens
527453560e Update <dir> reference in help text
Fixes #11151
2020-03-18 10:18:29 +01:00
JJ Kasper
836f68aa67
Add CSS file to build output (#11145)
* Remove filtering CSS from build output

* Add displaying page specific CSS files and including them in page size
2020-03-18 09:47:39 +01:00
Tim Neutkens
88a6bb36ba
Update blog-starter example (#11071)
* Update blog-starter example

* Updated content

* Updated readme

* Updated readme

* static → assets

* Add bottom margin

* Add to docs

* Add excerpt

* Update docs/advanced-features/preview-mode.md

Co-authored-by: Luis Alvarez <luis@zeit.co>
Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-03-18 09:43:09 +01:00
JJ Kasper
203f43c1fe
Add error when attempting to export GSSP page (#11154)
* Add error when attempting to export GSSP page

* Update errors/gssp-export.md

* Update errors/gssp-export.md

* Update errors/gssp-export.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-18 09:33:10 +01:00
Shu Uesugi
408a01ce95
Update CLI custom config documentation link (#11152)
* Update CLI custom config documentation link

* Update packages/next/cli/next-dev.ts

Co-Authored-By: Joe Haddad <timer150@gmail.com>

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-03-18 09:21:12 +01:00
Tim Neutkens
9730be6734 v9.3.1 2020-03-17 16:06:51 +01:00
Tim Neutkens
d661fac733 v9.3.1-canary.7 2020-03-17 15:39:49 +01:00
Tim Neutkens
7e2d476e44
Update examples to use getStaticProps where possible (#11136)
* Remove micro example

* Remove page that uses getInitialProps

* Update with-docker example

* Update dynamic import example

* Update Fela example

* Update Flow example

* Update framer motion example

* Remove freactal example

* Remove with-higher-order-component

* Remove with-immutable-redux-wrapper as it shows avenues to performance issues

* Remove example that doesn't have usage

* Update with-kea

* Remove example that is not used

* Update next-page-transitions example

* Remove next-routes example as dynamic routes are supported by default

* Add link to documentation

* Update Overmind example

* Update pretty-url-routing example

* Remove update with low usage

* Update with-react-ga example

* Update React Helmet example

* Remove mobile-detect from carousel example

* Remove react-useragent as it shows a bad practice

* Remove react-uwp example as it has low usage

* Remove recompose example as it shows outdated practices

* Remove refnux example as it has low usage

* Remove example that can be created using api routes

* Update with-segment-analytics

* Update socket.io example

* Remove socket.io example as it's shows bad practices

* Update static export example

* Update universal configuration example
2020-03-17 15:07:27 +01:00
Kenta Moriuchi
bfab9907b1
Move public directory for development in examples/with-firebas… (#11085) 2020-03-17 11:30:59 +01:00
Sangwon Lee
22e3b93913
Update with-react-multi-carousel example to use GSSP (#11069) 2020-03-17 11:28:59 +01:00
Tim Neutkens
3e1ace37af
Update API routes documentation to correctly mention middlewar… (#11083)
Previously we said "Micro middlewares" but Next.js does not use micro. This would confuse users as both Next.js and Micro were created by ZEIT and Next.js API routes have different semantics than Micro handlers.

I've updated the docs to show how to use the `cors` middleware that's generally used in express apps.
2020-03-17 09:52:23 +01:00
Tim Neutkens
25d8652283 v9.3.1-canary.6 2020-03-16 10:57:41 +01:00
JJ Kasper
ea7c1e1dcf
Add support for SCSS options (#11063)
* Add support for SCSS includePaths

* Support sassOptions instead of just includePaths

Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-16 10:55:16 +01:00
Tim Neutkens
a231315bf4 Fix prettier linting 2020-03-16 10:20:26 +01:00
Paul Hale
d8d3337c4a
Update introduction.md (#11092)
* Update introduction.md

AMP is no longer an acronym for "Accelerated Mobile Pages"

* Update docs/advanced-features/amp-support/introduction.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-16 09:26:22 +01:00
Tim Neutkens
30cf4d5ab6 v9.3.1-canary.5 2020-03-15 15:15:19 +01:00
Kaito Sugimoto
4cac93a75e
Update @next/bundle-analyzer dependencies (#11068)
* Update @next/bundle-analyzer

* update module

* Update yarn.lock
2020-03-15 12:24:07 +01:00
Aaron Reisman
85e9ce1b0b
Update preset.ts: Remove any and use updated Node.js types (#11075)
Remove any and use updated Node.js types
2020-03-15 12:22:53 +01:00
Giuseppe
bc4aba1713
Upgrade styled-jsx (#11070)
The main change in this version is https://github.com/zeit/styled-jsx/pull/621
2020-03-15 11:51:55 +01:00
Carlos Pavanetti
bb3cce2315
Update ssr-caching example with getServerSideProps (#11032)
* Replace getInitialProps by getServerSideProps

* Replace getServerSideProps getStaticProps
2020-03-14 10:14:14 +01:00
JJ Kasper
71f97198d1
Add support for static 404 when _error does not have custom GIP (#11062)
* Add support for static 404 when _error does not have custom GIP

* Update tests
2020-03-14 09:58:20 +01:00
Tom Dohnal
e6b4cdd665
update form handler example (#11059) 2020-03-13 16:57:12 -05:00
Jazib Jafri
31a6410bb2
Update with-loading example to SSG (#11050)
* Update getInitialProps to getStaticProps

* Updated example

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-03-13 16:48:32 -05:00
Shu Uesugi
b596c2167d
Upgrade next.js version on datocms example (#11039)
* Remove unused files

* Update next

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-13 15:03:29 -04:00