8e4e07bfe2
* Fixed next-offline example to serve service worker * replaced custom server with rewrites |
||
---|---|---|
.. | ||
pages | ||
public | ||
next.config.js | ||
package.json | ||
README.md |
next-offline example
How to use
Using create-next-app
Execute create-next-app
with Yarn or npx to bootstrap the example:
npx create-next-app --example with-next-offline with-next-offline-app
# or
yarn create next-app --example with-next-offline with-next-offline-app
Download manually
Download the example:
curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-next-offline
cd with-next-offline
Install it and run:
npm install
npm run dev
npm run export
serve -s out
# or
yarn
yarn dev
yarn export
serve -s out
Deploy it to the cloud with now (download)
now
The idea behind the example
This example demonstrates how to use the next-offline plugin It includes manifest.json to install app via chrome