typedoc-webpack-plugin

raw JSON →
1.1.4 verified Sat Apr 25 auth: no javascript abandoned

Runs TypeDoc documentation generation as a Webpack plugin. Latest version 1.1.4 (last released 2017) requires typedoc ^0.5.0 as peer dependency. It is an older, unmaintained plugin; consider using typedoc-plugin-webpack instead. It supports file/directory input, JSON output, and mirrors TypeDoc options.

error TypeError: TypedocWebpackPlugin is not a constructor
cause ESM import used or wrong export access.
fix
Use const TypedocWebpackPlugin = require('typedoc-webpack-plugin');
error Error: Cannot find module 'typedoc'
cause Missing peer dependency typedoc.
fix
Run: npm install typedoc@0.5 --save-dev
breaking Plugin is unmaintained; no updates since 2017. May not work with Webpack 5 or newer TypeDoc versions.
fix Use typedoc-plugin-webpack instead.
deprecated TypeDoc peer dependency is ^0.5.0; later TypeDoc versions have breaking API changes.
fix Pin TypeDoc to 0.5.x or migrate to alternative.
gotcha Options are passed directly to TypeDoc; not all TypeDoc options may be supported.
fix Refer to TypeDoc 0.5 documentation.
npm install typedoc-webpack-plugin
yarn add typedoc-webpack-plugin
pnpm add typedoc-webpack-plugin

Webpack 4 configuration using typedoc-webpack-plugin to generate docs from src/ into ./docs.

const TypedocWebpackPlugin = require('typedoc-webpack-plugin');
module.exports = {
  entry: './src/index.ts',
  output: { path: './dist' },
  resolve: { extensions: ['.ts', '.js'] },
  module: { rules: [{ test: /\.ts$/, loader: 'ts-loader' }] },
  plugins: [
    new TypedocWebpackPlugin({
      out: './docs',
      module: 'commonjs',
      target: 'es5',
      exclude: '**/node_modules/**/*.*',
      experimentalDecorators: true,
      excludeExternals: true
    }, './src')
  ]
};