diff --git a/examples/cached-components/nuxt.config.js b/examples/cached-components/nuxt.config.js new file mode 100644 index 0000000000..6277640bf8 --- /dev/null +++ b/examples/cached-components/nuxt.config.js @@ -0,0 +1,3 @@ +module.exports = { + cache: true +} diff --git a/examples/cached-components/package.json b/examples/cached-components/package.json new file mode 100644 index 0000000000..05750ddc83 --- /dev/null +++ b/examples/cached-components/package.json @@ -0,0 +1,11 @@ +{ + "name": "nuxt-cached-components", + "dependencies": { + "nuxt": "latest" + }, + "scripts": { + "dev": "nuxt", + "build": "nuxt build", + "start": "nuxt start" + } +} diff --git a/examples/cached-components/pages/index.vue b/examples/cached-components/pages/index.vue new file mode 100644 index 0000000000..26366e54ae --- /dev/null +++ b/examples/cached-components/pages/index.vue @@ -0,0 +1,20 @@ + + + Cached components + Look at the source code and see how the timestamp is not reloaded before 10s after refreshing the page. + Timestamp: {{ date }} + + + +
Look at the source code and see how the timestamp is not reloaded before 10s after refreshing the page.
Timestamp: {{ date }}