2.5.26 • Published 21 days ago

@dumlj/pretty-assets-tree-webpack-plugin v2.5.26

Weekly downloads
-
License
MIT
Repository
github
Last release
21 days ago

License: MIT  Github Repo  NPM Version  See Docs  codecov  DeepSource 

Pretty Assets Tree Webpack Plugin

Pretty print assets tree.

BACKGROUND

When writing DEMO, it need to print files from webpack build in the form of a tree, but Webpack only provides file arrays and cannot output well.

INSTALL

# use npm
$ npm install --dev @dumlj/pretty-assets-tree-webpack-plugin
# use yarn
$ yarn add --dev @dumlj/pretty-assets-tree-webpack-plugin
# use pnpm
$ pnpm add @dumlj/pretty-assets-tree-webpack-plugin -D

USAGE

import { PrettyAssetsTreeWebpackPlugin } from '@dumlj/pretty-assets-tree-webpack-plugin'

export default {
  mode: 'production',
  plugins: [
    new PrettyAssetsTreeWebpackPlugin({
      banner: chalk.whiteBright.bold('The following files are artifacts.'),
      include: ['**/*.d.ts'],
    }),
  ],
}

LIVE DEMO

In the demo, the files is output to the memory, please check the console. Or remove the comment writeToDisk: true from the MemfsWebpackPlugin in webpack.config.ts and run yarn build.

INTERNAL DEPENDENCIES