vuepress-plugin-server-push
v0.2.1
Published
HTTP Server Push header generator for Vuepress.
Downloads
1
Maintainers
Readme
Vuepress Plugin Server Push
Server push links generator for vuepress.
Install
npm add vuepress-plugin-server-push
Usage
Vuepress 1.x
// .vuepress/config.js
const path = require('path')
module.exports = {
plugins: [
['server-push', {
firebase: path.resolve('../firebase.json')
netlify: '_headers' // only file name
}]
]
}
Vuepress 0.x
- Generate netlify
_headers
file
vuepress-server-push dist --netlify
- Generate firebase server push headers link to
firebase.json
vuepress-server-push dist --firebase
- Using postbuild script
{
scripts: {
build: "vuepress build docs -d dist",
postbuild: "vuepress-server-push dist --netlify",
}
}