LogoPixi’VN
viteInterfaces

Interface: VitePluginInkOptions

Defined in: src/vite/plugins.ts:341

Options for vitePluginInk.

Properties

inkGlob?

> optional inkGlob?: string

Defined in: src/vite/plugins.ts:359

Glob pattern specifying which .ink files to scan and load automatically.

When provided, a virtual module virtual:pixi-vn-ink is generated and can be imported anywhere in your app. It exports, as its default export, an array of strings (string[]) containing the raw text of every matched .ink file.

This eliminates the need to manually write a glob-import helper such as getInkText.

The pattern follows the standard glob format used by Vite's import.meta.glob. The plugin resolves it from Vite root and internally normalizes it to a root-absolute pattern for the generated virtual module.

Examples

"./ink/**/*.ink"
"/src/stories/**/*.ink"

inkJsonManifestPath?

> optional inkJsonManifestPath?: string

Defined in: src/vite/plugins.ts:393

Custom path (including filename) for the manifest file generated alongside the exported JSON files.

When VitePluginInkOptions.inkJsonOutputPattern is set, a manifest.json file listing all exported JSON URLs is written into the output base directory by default. Use this option to override the manifest file location and/or its name.

Relative values are resolved from Vite root.

Examples

"./public/ink-json/index.json"
"./generated/manifest.json"

inkJsonOutputPattern?

> optional inkJsonOutputPattern?: string

Defined in: src/vite/plugins.ts:379

Output pattern for generated JSON files from matched .ink sources.

When provided together with VitePluginInkOptions.inkGlob, each matched .ink file is converted with convertInkToJson and written to the rendered destination.

Placeholders:

  • [name]: filename without extension
  • [ext]: source extension without dot
  • [extname]: source extension with dot
  • [file]: source path relative to the inkGlob static base
  • [path]: source directory relative to the inkGlob static base (with trailing slash)
  • [dir]: source directory relative to Vite root (with trailing slash)

Relative values are resolved from Vite root.

Examples

"./public/ink-json/[path][name].json"
"/absolute/output/[dir][name].json"