webpack-config-dump-plugin
TypeScript icon, indicating that this package has built-in type declarations

3.0.3 • Public • Published

[Webpack plugin] Dump Webpack Config into file system

A webpack plugin to dump compiled webpack config into file system. Is useful in case you have resolve aliases formed dynamically and want your IDE to be able to handle them.

For typescript config file you can use webpack-typescript-config-dump-plugin

MIT License pm version

Installation

npm i webpack-config-dump-plugin --save-dev

Usage

Javascript module

const { WebpackConfigDumpPlugin } = require("webpack-config-dump-plugin");

// webpack config
{
  plugins: [new WebpackConfigDumpPlugin(options)];
}

Typescript module

import { WebpackConfigDumpPlugin } from "webpack-config-dump-plugin";

// webpack config
{
  plugins: [new WebpackConfigDumpPlugin(options)];
}

Options and defaults

Option Type Required Default Description
outputPath string no ./ Path to store config dump
name string no webpack.config.dump Dump filename
depth number no 4 Config depth. Since webpack config is circularly locked, we can't dump whole config. This parameter sets how deep config dump will be stored
keepCircularReferences boolean no false If true, dumps whole config (disables the "depth" option) and marks parts that are circular references
showFunctionNames boolean no false By default functions are excluded from the final dump. If true, plugin marks properties that are functions
includeFalseValues boolean no false By default false-ish values are excluded from the dump. If true, plugin will dump empty objects, 0, '' etc

Changes

  • 3.0.2 Bumped dependencies. Also wildcard the lodash and webpack-log so it accepts any version change from the upstream project

  • Version 3 Added more flexibility, see the options section.
    Introduced some features like keepCircularReferences and so forth
    BREAKING: Adjusted consistency for empty values. Now it does not output empty objects and empty arrays by default (i.e. with includeFalseValues=false). Check the plugin configuration for details.

  • Version 2 In version 2 the plugin has been rewritten using Typescript.
    BREAKING: Now it needs to be imported as ES module. Check the information above for details.

Package Sidebar

Install

npm i webpack-config-dump-plugin

Weekly Downloads

6,525

Version

3.0.3

License

MIT

Unpacked Size

12.4 kB

Total Files

5

Last publish

Collaborators

  • n0th1ng_else