vite-ssr-vue
Version:
Vite utility for vue3 server side rendering
38 lines (31 loc) • 981 B
TypeScript
import { ViteDevServer, Connect, Plugin } from 'vite';
interface PluginOptions {
name?:string, // plugin name, default: vite-ssr-vue
ssr?: string, // way to server entry point, if you want to use this separately
/**
* way to custom entry points
* used for build production chunk
* * for develop custom implementation must be used
*/
custom?: {
ws?: string,
[key: string]: string
}
// Custom serve middleware
serve?: (server: ViteDevServer, options: PluginOptionsInternal) => Connect.NextHandleFunction,
[key: string]: any
}
// Plugin options with addition params
interface PluginOptionsInternal extends PluginOptions {
name:string,
wrappers: {
client:string,
server:string
}
}
/**
* Vite plugin vite-ssr-vue
* @param opt plugin options
*/
declare const _default: (opt?: PluginOptions) => Plugin;
export { type PluginOptions, type PluginOptionsInternal, _default as default };