Migrated to vuepress-community
A VuePress plugin that serves generated files.
After using this plugin, VuePress will add a serve
command. This command will created a server based on the generated files. It has the following options:
Execute vuepress build
before creating the server.
Open the browser when the server is ready.
See host.
See port.
- type:
string
- default:
'serve'
Vuepress-plugin-serve will add a vuepress command. This option can be used to specify the command name.
- type:
string
- default:
'localhost'
Specify the host to use for the server.
- type:
number
- default:
8080
Specify the port to use for the server.
- type:
string
- default:
'404.html'
Path for "404 not found" page.
- type:
object
- default:
{}
Options for serve-static.
- type:
(app, server) => void
- default:
undefined
Executed before the server accepts client information. Similar to VuePress's beforeDevServer option.
- type:
async (app, server) => void
- default:
undefined
Executed after the server accepts client information. Similar to VuePress's afterDevServer option.
- type:
(config: Config) => void
- default:
undefined
This hook will be called when the server is being built.
See chainWebpack.
- type:
Record<string, string> | (() => Record<string, string>)
- default:
{}
This hook will be called when the server is being built.
See define.
- type:
Record<string, string> | (() => Record<string, string>)
- default:
{}
This hook will be called when the server is being built.
See alias.
Contribution Welcome!