This plugin generates image paths for the BBImage component. Generates TypeScript type defintiions for asset paths that can be used for making the src attribute type-safe of the actual images that are available.
yarn add -D @zfgc/vite-plugin-generate-image-pathsimport { defineConfig } from "vite";
import { generateImagePaths } from "@zfgc/vite-plugin-generate-image-paths";
export default defineConfig({
plugins: [
generateImagePaths({
// Options
}),
],
});Type: string
Default: "public"
Root directory for assets.
Type: string[]
Default: ["images", "themes"]
Array of subdirectories to scan for generating types.
Type: string
Default: "build"
Tyoe output directory.
Type: string
Default: "build/client/assets"
Client assets output directory.
Type: string
Default: "build/server/assets"
Server assets output directory.
Type: boolean
Default: false
Enable debug logging.