Registry / devops / vite-plugin-custom-functions-metadata

vite-plugin-custom-functions-metadata

JSON →
library1.0.1jsnpmunverified

Vite plugin (v1.0.1) that generates JSON metadata for custom Excel functions from TypeScript source files, intended for Office Add-ins development. It scans a given input file for JSDoc-annotated functions and outputs a metadata JSON file referencing function names, descriptions, and parameters. The plugin is designed to integrate into the Vite build pipeline, automating metadata generation that would otherwise require manual maintenance. Differentiators: dedicated to Excel custom functions, leverages TypeScript type definitions, and provides a simple plugin interface for modern Vite projects. Release cadence is currently low; no breaking changes known.

npm install vite-plugin-custom-functions-metadata
INSTALL
IMPORT
SIG · VITE-PLUGIN-CUSTOM
V
vite-plugin-custom-functions-metadata
devopsjavascriptv1.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import customFunctionsMetadataPlugin from 'vite-plugin-custom-functions-metadata'
const customFunctionsMetadataPlugin = require('vite-plugin-custom-functions-metadata')
ESM-only; CommonJS require will fail.
customFunctionsMetadataPlugin
import customFunctionsMetadataPlugin from 'vite-plugin-custom-functions-metadata'
import { customFunctionsMetadataPlugin } from 'vite-plugin-custom-functions-metadata'
The package exports a default export, not a named export.
PluginOptions
import type { PluginOptions } from 'vite-plugin-custom-functions-metadata'
TypeScript users can import the type for options when configuring the plugin.

Configures the Vite plugin to generate Excel custom functions metadata from a TypeScript input file.

import { defineConfig } from 'vite'; import customFunctionsMetadataPlugin from 'vite-plugin-custom-functions-metadata'; import { resolve } from 'path'; export default defineConfig({ plugins: [ customFunctionsMetadataPlugin({ inputFile: resolve(__dirname, 'src/functions/functions.ts'), outputFile: resolve(__dirname, 'src/functions/functions.json'), }), ], });
Debug
Known issues
gotchaThe plugin only processes a single input file; if your functions are split across multiple files, you must manually aggregate them into one input file or use a workaround.
fix
Create a barrel file that re-exports all custom functions from separate modules.
affects: >=1.0.0
gotchaThe output JSON file is overwritten on every build; ensure no manual edits are lost.
fix
Do not manually edit the output file; treat it as a build artifact.
affects: >=1.0.0
gotchaJSDoc annotations are required for function metadata to be generated; plain TypeScript without JSDoc will not produce entries.
fix
Add JSDoc tags like @customfunction, @param, @returns to your functions.
affects: >=1.0.0
breakingNo breaking changes known yet; however, the plugin is at v1.0.x and may introduce breaking changes in future major versions.
fix
Pin to version 1.x and test upgrades.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'vite-plugin-custom-functions-metadata'
Package not installed or using require() in an ESM-only package.
fix
Install with 'npm install vite-plugin-custom-functions-metadata --save-dev' and use import syntax.
TypeError: customFunctionsMetadataPlugin is not a function
Default import expected but named import used incorrectly.
fix
Use 'import customFunctionsMetadataPlugin from ...' instead of destructured import.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
viterequiredpeer dependency; the plugin is designed to work with Vite
Agent activity
8 hits · last 30 days
node
8
Resources
vite-plugin-custom-functions-metadata — npm install vite-plugin-custom-functions-metadata · libregistry