1.0.4 • Published 6 months ago

@mutsuntsai/rsbuild-plugin-vue-ssg v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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-ssg

Peer 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
		});
	],
});
1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago