Commit graph

281 commits

Author SHA1 Message Date
Matthew Mueller
ab14770318 Remove trailing comma to fix lint (#398) 2016-12-16 03:52:04 +05:30
Arunoda Susiripala
36abdc77c5 Prefetch pages with Service Workers (#375)
* Register the service worker.

* Update prefetcher code to do prefetching.

* Implement the core prefetching API.
support "import <Link>, { prefetch } from 'next/prefetch'"

* Implement a better communication system with the service worker.

* Add a separate example for prefetching

* Fix some typos.

* Initiate service worker support even prefetching is not used.
This is pretty important since initiating will reset the cache.
If we don't do this, it's possible to have old cached resources
after the user decided to remove all of the prefetching logic.
In this case, even the page didn't prefetch it'll use the
previously cached pages. That because of there might be a already running
service worker.

* Use url module to get pathname.

* Move prefetcher code to the client from pages
Now we also do a webpack build for the prefetcher code.

* Add prefetching docs to the README.md

* Fix some typo.

* Register service worker only if asked to prefetch
We also clean the cache always, even we initialize
the service worker or not.
2016-12-15 11:13:40 -08:00
Matthew Mueller
422c631832 remove react-dom/lib/HTMLDOMPropertyConfig for better interop (#392) 2016-12-15 15:05:20 +09:00
Matthew Mueller
a8f58be450 fix link for environments without synthetic events (like preact/the browser) (#393) 2016-12-15 10:03:02 +05:30
Chris
204d335273 update example with correct syntax (#383)
- was using `]` instead of `}`
2016-12-13 14:36:20 +09:00
Benjamin E. Coe
0f2979b02b chore: switch from ava to jest (#381) 2016-12-12 21:31:49 +09:00
Stephen Sauceda
694c8c56c7 update default page generated by next init (#376)
* use next logo on 'init' start page

* use github cdn for logo
2016-12-11 12:01:39 -08:00
nkzawa
b4ccb126d9 ignore .babelrc on babel-loader 2016-12-11 18:09:54 +09:00
Greenkeeper
3de4788e0e chore(package): update babel-plugin-transform-object-rest-spread to version 6.20.2 (#371) 2016-12-09 10:36:46 +09:00
Greenkeeper
a5ae843aca chore(package): update babel-loader to version 6.2.9 (#359) 2016-12-09 09:49:46 +09:00
Greenkeeper
cf5daae62f chore(package): update webpack to version 1.14.0 (#357) 2016-12-09 09:35:07 +09:00
Greenkeeper
423dd94748 chore(package): update babel-core to version 6.20.0 (#365) 2016-12-09 09:34:55 +09:00
Greenkeeper
fac5c19472 chore(package): update babel-generator to version 6.20.0 (#366) 2016-12-09 09:26:44 +09:00
Greenkeeper
2edbab7934 chore(package): update babel-runtime to version 6.20.0 (#368) 2016-12-09 09:26:14 +09:00
Guillermo Rauch
0923a0bd83 Update README.md 2016-12-08 09:16:05 -08:00
Luke Edwards
249a0c4007 append bundle script to body (#353) 2016-12-07 08:53:50 +09:00
Leo Lamprecht
7ee6b0f4b0
Yarn's lockfile should be part of the repo
https://yarnpkg.com/en/docs/yarn-lock
2016-12-06 21:57:21 +01:00
Leo Lamprecht
51fe1991c0
Empty line after imports 2016-12-06 21:41:33 +01:00
Leo Lamprecht
7bb903d563
Only show the URL locally, not on the Now platform
Now outputs a URL by itself
2016-12-06 21:39:26 +01:00
Arunoda Susiripala
7086287eaf Set the default minChunks values to the length of pages. (#350)
Earlier it was for all length of entry points.
But we add two more entry points for errors.
Because of that, moving common modules to commons.js won't work.
2016-12-06 10:25:01 +01:00
Naoyuki Kanezawa
edfdc482e3 fix to not call hot.accept on sub-components (#294) (#351) 2016-12-06 10:24:42 +01:00
Naoyuki Kanezawa
9990a5fc78 use react-hot-loader/webpack (#338) 2016-12-05 18:09:38 +01:00
Greenkeeper
5c64041dd7 chore(package): update is-windows-bash to version 1.0.3 (#343) 2016-12-05 18:08:54 +01:00
Chua Kiem Fai
f61335066b Update package.json (#346)
Fix following issue in Docker
https://github.com/IanMitchell/is-windows-bash/pull/2
https://github.com/zeit/next.js/issues/344
2016-12-05 18:08:45 +01:00
nkzawa
0b20273c77 remove workaround for react-hot-loader 2016-12-04 07:06:47 +09:00
nkzawa
e1a231cd68 remove FriendlyErrorsWebpackPlugin option 2016-12-04 07:01:15 +09:00
Greenkeeper
c5667a7539 chore(package): update friendly-errors-webpack-plugin to version 1.1.2 (#337) 2016-12-04 04:21:32 +09:00
Matheus Fernandes
982a01cd60 Update Future directions (#332) 2016-12-03 09:13:40 +09:00
Greenkeeper
c8ba9bb88d chore(package): update glamor to version 2.20.12 (#328) 2016-12-02 23:38:17 +09:00
Sébastien Dubois
9950ee73a3 Remove line break between badges (#330) 2016-12-02 23:38:02 +09:00
nkzawa
f3a42e9590 Release 1.2.3 2016-12-02 23:06:18 +09:00
Arunoda Susiripala
65c4e1e5bd Init next.js even after dom is loaded. (#326)
Earlier we add a event to init next.js when dom has loaded.
But if at that time dom is already loaded, next.js won't get init ever.
Now we are using domready NPM module which handle these for us.
2016-12-02 22:59:10 +09:00
nkzawa
ea5ec12c2d Release 1.2.2 2016-12-02 17:06:04 +09:00
Arunoda Susiripala
5c2e845ad7 Revert "Allow the pages directory to be in node_modules (#318)" (#324)
This reverts commit a13c6ccb11.
2016-12-02 16:58:08 +09:00
nkzawa
39ba1a0110 Release 1.2.1 2016-12-02 15:59:10 +09:00
Naoyuki Kanezawa
f049a0bfa0 fix reading incorrect package.json (#323) 2016-12-02 15:56:02 +09:00
nkzawa
6ca52f3ee2 use template literals for console.log 2016-12-02 15:29:02 +09:00
nkzawa
f2653d0e2f Release 1.2.0 2016-12-02 14:51:48 +09:00
nkzawa
e0fb04d685 clear console on each webpack build 2016-12-02 14:46:45 +09:00
Kav Singh
8a2981746b Fix constructor declaration in HeadManager (#321) 2016-12-02 12:51:56 +09:00
nkzawa
b23f193124 bump friendly-errors-webpack-plugin 2016-12-02 10:53:25 +09:00
Naoyuki Kanezawa
12f31b5bf3 Source map support (#279)
* generate source-maps on development

* remove unused dep
2016-12-02 10:43:38 +09:00
nkzawa
6ad1e23167 Merge branch 'master' into pr/259 2016-12-02 10:35:07 +09:00
nkzawa
4a71fb6b3c Merge branch 'master' into pr/264 2016-12-02 10:21:21 +09:00
Naoyuki Kanezawa
fc369fa240 webpack: emit json and apply json-loader after emitting files (#298) 2016-12-01 17:46:49 -05:00
Greenkeeper
f9726a5d59 chore(package): update dependencies (#289) 2016-12-01 20:58:50 +09:00
nkzawa
214c885b90 remove unnecessary escape character for lint 2016-12-01 20:54:17 +09:00
Greenkeeper
c36e0d98fd chore(package): update standard to version 8.6.0 (#292) 2016-12-01 20:50:35 +09:00
Greenkeeper
fff12d14db chore(package): update is-windows-bash to version 1.0.2 (#305) 2016-12-01 20:41:10 +09:00
Greenkeeper
333708c751 chore(package): update babel-plugin-module-resolver to version 2.4.0 (#314) 2016-12-01 20:40:38 +09:00