Commit graph

3831 commits

Author SHA1 Message Date
Tim Neutkens
6a507fad1d v8.1.1-canary.66 2019-07-03 14:41:25 +02:00
Tim Neutkens
a785ff7376
Bring down bundle size (#7743) 2019-07-03 14:38:21 +02:00
Tim Neutkens
a88d6b7482 v8.1.1-canary.65 2019-07-03 13:44:09 +02:00
JJ Kasper
7cf132f864
[Refactor] Move context providers to AppContainer (#7737) 2019-07-02 19:16:12 -07:00
Joe Haddad
e798b664a1
Add router event note (#7736)
* Add router event note

* Add line break

* Tweak wording
2019-07-02 21:35:38 -04:00
JJ Kasper
6ce7c06d9c Add initial static indicator (#7682)
* Add initial static indicator

* Update indicator text to pre-rendered

* Update naming from static to prerender

* Update to not re-use nextExport var

* Update positioning of indicator to prevent overlap
2019-07-02 20:42:41 -04:00
Joe Haddad
7439a773b0 Nit: Change Pre-render to Prerender (#7733) 2019-07-02 22:51:12 +02:00
Luis Fernando Alvarez D
c8bd427193 Dynamic routing documentation (#7602)
* Added basic example for dynamic routing

* Added some basic docs for dynamic routing

* Added more docs for dynamic routing

* Used doctoc

* fixed lint issues

* Added useRouter to docs

* Removed getInitialProps examples that are only using router props

* Added useRouter to the navigation

* Small fix

* Updated to the latest dynamic routes implementation

* lint fix

* Update dynamic routing example

* Tweak dynamic routing documentation

* Make basic example basic again

* Adjust dynamic routes section

* Remove query param for dynamic routes example

* Remove old note

* Fix linting
2019-07-02 16:00:58 -04:00
JJ Kasper
def94e6173
v8.1.1-canary.64 2019-07-01 15:23:15 -07:00
Luis Fernando Alvarez D
87610ccff5 Update with-zones example and Multi Zones documentation (#7513)
* Updated with-zones example to Now V2

* Updated Zones docs

* Update packages/next/README.md

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>
2019-07-01 15:21:00 -07:00
JJ Kasper
0ca8087565
Add prerender PageConfig option (#7699)
* Add prerender PageConfig option

* Update PageConfig type

* Add inlining of data when pre-render is set and add tests

* Update types import

* Add check for props

* Rename prerender to experimentalPrerender for now
2019-07-01 14:13:52 -07:00
Joe Haddad
0faf693ed2
Do not default TypeScript to strict: true (#7717) 2019-07-01 13:13:58 -04:00
Joe Haddad
5493f2e8b3
Remove Next.js debug mode (#7719) 2019-07-01 13:13:06 -04:00
Lukáš Huvar
4ad934c148 Serverless build for API routes (#7649)
* Fixes serverless target in development

* Fix serverless build

* Fix serverless build

* Add manifest test

* Better output

* Fix manifest test

* Update snapshot

* Remove snapshots
2019-07-01 12:47:11 -04:00
Joe Haddad
af94c27a9d
Upgrade watchpack to remove eslint-config-prettier (#7716) 2019-07-01 11:09:20 -04:00
Joe Haddad
c92e8c2a09
Remove "small" wording from runtime config overhead (#7715)
Using runtime configuration can cause you to de-optimize entire classes of optimizations.
These optimizations could make your application an order of magnitude faster (i.e. prerendering).
2019-07-01 11:09:09 -04:00
Johnboy
ed997b1131 Add back in second line of comment (#7718)
The second line of this comment was removed in the previous commit due to the usage of process.browser.
This meant the comment was incomplete and confusing
c03e94bebd (diff-a15b49cbb3a523d81a74e0fab7f08eb5)
2019-07-01 11:08:55 -04:00
JJ Kasper
564eac4746
Fix styled-jsx not rendering when used in node_modules (#7697)
* Don't transpile styled-jsx in server mode

* Add test fo styled-jsx-module

* Add styled-jsx as dependency of next-server
2019-06-29 15:42:07 -07:00
Josh Chorlton
15bcdab55c Add path to exportPathMap query missing message (#7708)
* Add path to exportPathMap query missing message

* Path to Url
2019-06-29 15:13:23 -07:00
JJ Kasper
aeeba6b2e8
v8.1.1-canary.63 2019-06-28 18:02:20 -07:00
JJ Kasper
356636c80f Add updated de-duping logic for next/dynamic (#7705) 2019-06-28 20:48:28 -04:00
Luis Fernando Alvarez D
7049c3b349 Updated with-now-env example (#7694) 2019-06-28 15:14:56 -07:00
Joe Haddad
39761e5ce7 Remove withAmp and do not expose isInAmpMode (#7690)
* Remove `withAmp` and do not expose `isInAmpMode`
This pull request removes the `withAmp` higher-order component in favor of the exported configuration object.
Retaining this backwards compatibility isn't worth the extra maintenance burden, given it hasn't been released for very long and the migration is ultra-simple.

I'm 👎 on retaining backwards compatibility just for the sake of it.

Migration example follows. I'm willing to write a codemod if reviewers feel it's necessary.

*Before*
```js
import { withAmp } from 'next/amp'

function Home() {
  return <h1>My AMP Page</h1>
}

export default withAmp(Home)
// or
export default withAmp(Home, { hybrid: true })
```

*After*
```js
export default function Home() {
  return <h1>My AMP Page</h1>
}

export const config = {
  amp: true,
  // or
  amp: 'hybrid',
}
```

* Fix { amp: 'hybrid' }

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-06-28 15:04:24 -07:00
Joe Haddad
808a3bcc66
v8.1.1-canary.62 2019-06-28 17:12:01 -04:00
Luis Fernando Alvarez D
e35053e8c3 Improve prefetch docs (#7692)
* added docs for disabling prefetch

* Update packages/next/README.md

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-06-28 13:57:22 -07:00
JJ Kasper
cf9762e089
Expand automatic pre-rendering docs (#7702)
* Expand automatic pre-rendering docs

* Apply suggestions from code review

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>
2019-06-28 13:47:55 -07:00
Joe Haddad
3aed76fad8
Unflag Automatic Prerendering (#7666)
* Unflag Dynamic Routing

* Unflag Automatic Prerendering

* Ensure pages are lambdas for test

* Fix file check

* Fix tests

* oof

* Use lambda for document middleware test
2019-06-28 16:01:11 -04:00
JJ Kasper
291eb83923 Revert "Remove modules option from dynamic (#7688)" (#7701)
This reverts commit 0fd7e68556.
2019-06-28 13:39:23 -04:00
JJ Kasper
5f40306575 Remove coveralls (#7689) 2019-06-28 09:09:27 -04:00
JJ Kasper
0fd7e68556 Remove modules option from dynamic (#7688)
* Remove modules option from dynamic

* Remove old test
2019-06-28 09:02:33 -04:00
Lukáš Huvar
c156e0c889
Helpers update (#7686)
* Update helper function to invoke only on get

* Tests for body parsing

* Update api-utils.ts

* Update next-server.ts

* Update packages/next-server/server/next-server.ts

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-06-28 11:31:32 +02:00
Taro Shono
ec958a3bd0 refactor: default dynamic loading component to null (#7543) 2019-06-27 18:07:07 -07:00
JJ Kasper
5e70a2f74c Make DefaultLoading return null (#7695) 2019-06-27 19:05:10 -04:00
Lukáš Huvar
bd31c5d1b7 Dynamic routes for API (#7629)
* Dynamic routes for API

* New structure

* Change next config

* Refactoring tests

* Fix newline

* Fix tests

* Remove dynamic from config

* Apply suggestions from code review

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

* Update index.test.js
2019-06-27 12:01:36 -04:00
JJ Kasper
b4e4bcda9b Clean up AMP logic and naming (#7669)
* Clean up AMP logic

* Tweak AMP logic some more

* Rename hasAmpVersion to hybridAmp
2019-06-27 10:22:24 -04:00
Lukáš Huvar
830281fecd Update typescript example (#7684) 2019-06-27 13:50:38 +02:00
JJ Kasper
44d8c624f4
v8.1.1-canary.61 2019-06-26 14:59:13 -07:00
JJ Kasper
7c30bf97f6
Re-add require cache clearing (#7674) 2019-06-26 12:16:54 -07:00
Joe Haddad
e7110a0347
Asynchronously check for type errors (#7668)
* Asynchronously check for type errors

* Add TODO

* Fix webpack invalidation

* Show TypeScript error in dev client
2019-06-26 14:54:23 -04:00
Eduardo P. Rivero
2259a7ec1f Updating hapijs package name (#7664)
* Updating hapijs package name

Hapi was moved to a new module under the name @hapijs/hapi.

Right now installing just as hapi is giving you this warning:

```bash
npm WARN deprecated hapi@18.1.0: This module has moved and is now available at @hapi/hapi. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
```
This change does not affect the integration with next and it continues to work great.

* Update package.json
2019-06-26 09:40:35 +02:00
JJ Kasper
bf04031f9d
v8.1.1-canary.60 2019-06-25 20:53:06 -07:00
JJ Kasper
f9491887fc
Fix maxConcurrentCalls used instead of maxConcurrentWorkers (#7672) 2019-06-25 20:51:40 -07:00
JJ Kasper
ba373d8707
v8.1.1-canary.59 2019-06-25 20:09:20 -07:00
JJ Kasper
9781510839
Parallelize requiring pages for static check (#7671) 2019-06-25 19:54:28 -07:00
JJ Kasper
c773dae48a
v8.1.1-canary.58 2019-06-25 15:57:57 -07:00
JJ Kasper
6a2e8cd81f
Fix memory leak from requiring pages (#7659) 2019-06-25 13:36:21 -07:00
Joe Haddad
19f3c4d77c
Unflag Dynamic Routing (#7663) 2019-06-25 10:28:48 -04:00
JJ Kasper
5a1b32dcf1
v8.1.1-canary.57 2019-06-24 18:12:22 -07:00
JJ Kasper
8c9819200b
Fix missing .test(path) in webpack-config (#7655) 2019-06-24 18:05:15 -07:00
JJ Kasper
9e22f06664
v8.1.1-canary.56 2019-06-24 16:45:18 -07:00