Registry / devops / custom-functions-metadata-plugin

custom-functions-metadata-plugin

JSON →
library2.1.7jsnpmunverified

A WebPack plugin (v2.1.7) for Office Add-ins that generates the metadata JSON file required by Excel custom functions. It pairs with the Custom Functions runtime to define function names, parameters, and descriptions. This plugin is specific to the Office Add-in development lifecycle and requires WebPack 5. It is part of the Office-Addin-Scripts monorepo maintained by Microsoft. Key differentiators: it auto-generates metadata from JavaScript/TypeScript comments, integrates tightly with WebPack 5, and is the official Microsoft tool for enabling Excel custom functions in web add-ins.

npm install custom-functions-metadata-plugin
INSTALL
IMPORT
SIG · CUSTOM-FUNCTIONS-M
C
custom-functions-metadata-plugin
devopsjavascriptv2.1.7
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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

CustomFunctionsMetadataPlugin
const CustomFunctionsMetadataPlugin = require('custom-functions-metadata-plugin');
import CustomFunctionsMetadataPlugin from 'custom-functions-metadata-plugin';
This plugin is CommonJS-only and does not support ESM imports.

Shows how to add the plugin to a WebPack config to generate Excel custom functions metadata from a source file.

const CustomFunctionsMetadataPlugin = require('custom-functions-metadata-plugin'); module.exports = { // ... other webpack config ... plugins: [ new CustomFunctionsMetadataPlugin({ input: './src/functions.js', output: './dist/functions.json' }) ] };
Debug
Known issues
breakingRequires WebPack 5, not compatible with WebPack 4.
fix
Update WebPack to version 5 or stay on plugin v1.x.
affects: >=2.0.0
gotchaInput file must contain JSDoc-style comments for each custom function. Without comments, metadata will be empty.
fix
Add @customfunction JSDoc tag and parameter descriptions to each exported function.
affects: all
deprecatedPlugin is part of a monorepo that also contains office-addin-manifest; manifest modifications moved to a separate command in v1.1.0.
fix
Use `office-addin-manifest modify` for manifest changes instead of relying on this plugin.
affects: >=2.0.0
Errors
Common errors & fixes
Error: 'input' is required
Missing input option in plugin configuration.
fix
Add input: './path/to/functions.js' to the plugin options.
Error: Module parse failed: Unexpected token (1:0)
WebPack cannot parse the input file (likely not a valid JS/TS module).
fix
Ensure input file exports functions with JSDoc comments and is a valid module.
Upgrade
Version history
2.1.7latest on npm
Audit
Dependencies
webpackrequiredpeer dependency - plugin only works with Webpack 5
Agent activity
4 hits · last 30 days
node
4
Resources
custom-functions-metadata-plugin — npm install custom-functions-metadata-plugin · libregistry