Introduce a simple prefetching solution (#957)
* Implement a very simple prefetching solution. * Remove next-prefetcher. * Require 'whatwg-fetch' only in the client. * Use xhr in the code. * Use a simple fetching solution. * Fix 404 and xhr status issue. * Move the prefetching implementation to next/router. * Add deprecated warnning for next/prefetch * Run only 2 parellel prefetching request at a time. * Change xhr to jsonPageRes. * Improve the prefetching logic. * Add unit tests covering the Router.prefetch() * Update examples to use the new syntax. * Update docs. * Use execOnce() to manage warn printing. * Remove prefetcher building from the flyfile.js Because, we no longer use it.
Showing
| ... | ... | @@ -85,6 +85,7 @@ |
| "webpack": "2.2.1", | ||
| "webpack-dev-middleware": "1.10.0", | ||
| "webpack-hot-middleware": "2.16.1", | ||
| "whatwg-fetch": "^2.0.2", | ||
| "write-file-webpack-plugin": "3.4.2" | ||
| }, | ||
| "devDependencies": { | ||
| ... | ... |
test/unit/router.test.js
0 → 100644
webpack.config.js
deleted
100644 → 0
Please
register
or
sign in
to comment