Registry / devops / jsdoc-webpack-plugin

jsdoc-webpack-plugin

JSON →
library0.3.0jsnpmunverified

Webpack plugin that runs JSDoc on your bundles, version 0.3.0. Low activity; last release 2016. Generates documentation from webpack bundle files, optionally using JSDoc config or bundle sources. Minimal features: conf path, CWD, preserve temp file, recursive flag. Less maintained than alternatives like 'jsdoc-webpack-plugin' or 'webpack-jsdoc'. Not suitable for modern webpack 5+ without potential compatibility issues.

npm install jsdoc-webpack-plugin
INSTALL
IMPORT
SIG · JSDOC-WEBPACK-PLUG
J
jsdoc-webpack-plugin
devopsjavascriptv0.3.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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

JsDocPlugin (default)
const JsDocPlugin = require('jsdoc-webpack-plugin');
const { JsDocPlugin } = require('jsdoc-webpack-plugin');
This package exports a single constructor as default via CommonJS. Named destructuring will get undefined.
JsDocPlugin (ESM)
import JsDocPlugin from 'jsdoc-webpack-plugin';
import { JsDocPlugin } from 'jsdoc-webpack-plugin';
ESM default import works if bundler config allows. Named import fails.
Plugin instantiation
new JsDocPlugin({ conf: 'jsdoc.conf.json' })
new JsDocPlugin.JsDocPlugin({ conf: 'jsdoc.conf.json' })
The required value is the constructor, not a namespace object.

Webpack config adding jsdoc-webpack-plugin to generate JSDoc documentation from bundle files.

const JsDocPlugin = require('jsdoc-webpack-plugin'); const path = require('path'); module.exports = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new JsDocPlugin({ conf: 'jsdoc.conf', cwd: '.', preserveTmpFile: false, recursive: false }) ] };
Debug
Known issues
breakingPlugin uses webpack 1 plugin API internally; incompatible with webpack 4/5 without modification.
fix
Use a maintained plugin like 'webpack-jsdoc' or 'jsdoc-webpack-plugin-v4'.
affects: >=4.0.0
deprecatedPackage has no updates since 2016; dependencies (jsdoc) may have breaking changes.
fix
Pin jsdoc version to known compatible range or migrate to a maintained plugin.
affects: >=0.1.0
gotchaOption 'conf' expects a file path without .json extension? Documentation unclear; actual behavior may differ.
fix
Experiment with 'jsdoc.conf', 'jsdoc.conf.json', or absolute path.
affects: 0.3.0
gotchaPlugin creates temporary files; may leave artifacts if preserveTmpFile false and jsdoc crashes.
fix
Set preserveTmpFile: true during development, clean manually if needed.
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: JsDocPlugin is not a constructor
Using named import instead of default: const { JsDocPlugin } = require('jsdoc-webpack-plugin');
fix
Use correct require: const JsDocPlugin = require('jsdoc-webpack-plugin');
Error: Cannot find module 'jsdoc'
jsdoc is not installed (not a package dependency, only peer).
fix
Install jsdoc: npm install --save-dev jsdoc
WebpackOptionsValidationError: Invalid configuration object
Plugin options passed incorrectly or webpack version incompatible.
fix
Ensure plugin is instantiated correctly: new JsDocPlugin({ conf: '...' }) and webpack version <= 3.
Upgrade
Version history
0.3.0latest on npm
Audit
Dependencies
jsdocrequiredCore dependency to generate JSDoc documentation; must be installed separately.
webpackoptionalPeer dependency; plugin works with webpack 1–3 (may break in 4/5).
Agent activity
8 hits · last 30 days
node
8
Resources
jsdoc-webpack-plugin — npm install jsdoc-webpack-plugin · libregistry