Registry / devops / vite-plugin-office-addin

vite-plugin-office-addin

JSON →
library2.1.0jsnpmunverified

Vite plugin for Office Add-in development. Copies and transforms manifest.xml during Vite builds. Latest version 2.1.0 supports Vite 4/5 and Node 18+. Provides dev-to-prod URL replacement via options or .env variables. Allows custom manifest paths and multiple manifest copying. Ships TypeScript types. Released under MIT.

npm install vite-plugin-office-addin
INSTALL
IMPORT
SIG · VITE-PLUGIN-OFFICE
V
vite-plugin-office-addin
devopsjavascriptv2.1.0
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 officeAddin from 'vite-plugin-office-addin'
import { officeAddin } from 'vite-plugin-office-addin'
Default export only.
OfficeAddinPluginOptions
import type { OfficeAddinPluginOptions } from 'vite-plugin-office-addin'
import { OfficeAddinPluginOptions } from 'vite-plugin-office-addin'
Type import; only available if using TypeScript.
require
const officeAddin = require('vite-plugin-office-addin').default
const officeAddin = require('vite-plugin-office-addin')
CommonJS require must access .default property due to ESM default export.

Basic setup: import default export and add to vite plugins array.

// vite.config.js import { defineConfig } from 'vite' import officeAddin from 'vite-plugin-office-addin' export default defineConfig({ plugins: [officeAddin()] })
Debug
Known issues
breakingVersion 2.0.0 dropped support for Vite 2/3 and Node 14/16. Only Vite 4/5 and Node 18/20 supported.
fix
Upgrade Vite to >=4.5.0 and Node to >=18.0.0.
affects: >=2.0.0
gotchaPlugin only copies manifest.xml from project root by default. If your manifest is elsewhere, you must set the `path` option.
fix
Configure with `officeAddin({ path: 'src/other-folder/manifest.xml' })`.
affects: >=1.0.0
gotchaCommonJS require pattern: `const officeAddin = require('vite-plugin-office-addin')` returns a module with default property; using it directly as a plugin will cause Vite to throw an error.
fix
Use `const officeAddin = require('vite-plugin-office-addin').default`.
affects: >=1.0.0
deprecatedNode 14 and 16 are no longer supported as of v2.0.0.
fix
Update Node.js to version 18 or 20.
affects: >=2.0.0
Errors
Common errors & fixes
Error: The service is unavailable. Try again later. If the problem persists, contact your administrator.
manifest.xml not found at default path (project root).
fix
Specify the correct path: `officeAddin({ path: 'src/manifest.xml' })`
TypeError: officeAddin is not a function
CommonJS require without accessing .default.
fix
Use `const officeAddin = require('vite-plugin-office-addin').default`
Error: [vite] The plugin 'vite-plugin-office-addin' requires at least Vite 4.5.0.
Installed version 2.x with an older Vite.
fix
Upgrade Vite to >=4.5.0 or downgrade plugin to v1.x.
Upgrade
Version history
2.1.0latest on npm
Audit
Dependencies
viterequiredpeer dependency - plugin requires Vite >=4.5.0
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
vite-plugin-office-addin — npm install vite-plugin-office-addin · libregistry