1.0.4 • Published 6 months ago
@mutsuntsai/rsbuild-plugin-vue-ssg v1.0.4
Rsbuild-Plugin-Vue-SSG
Generate Vue SSG contents and inject those into HTML for Rsbuild. Batteries included (html-minifier-terser and jsdom).
Installation
pnpm add -D @mutsuntsai/rsbuild-plugin-vue-ssgPeer dependencies include: @rsbuild/core, @rsbuild/plugin-vue, vue (v3).
Usage
import { defineConfig } from "@rsbuild/core";
import { pluginVue } from "@rsbuild/plugin-vue";
import { pluginVueSSG } from "@mutsuntsai/rsbuild-plugin-vue-ssg";
export default defineConfig({
source: {
entry: {
index: "./src/index.ts",
},
},
html: {
// The HTML template should contain the string
// "__VUE_SSG__" as the place for injection
template: "./src/index.html",
},
plugins: [
pluginVue(),
pluginVueSSG({
entry: {
// The entry name should match the source
index: "./src/app.vue",
},
// Lookup the typing here for the rest of the options
});
],
});