webpack-clean-comments-plugin

0.0.2 • Public • Published

webpack-clean-comments-plugin

a webpack plugin that clean webpack assets comments

installtion

  npm install --save-dev webpack-clean-comments-plugin
  // or 
  yarn add -D webpack-clean-comments-plugin

config

const WebpackCleanCommentsPlugin = require('./webpack-clean-comments-plugin');

// babel.config.js
module.exports = {
 
  plugins: [
   ...
   new WebpackCleanCommentsPlugin({
    comments: [
      /^\/\*[A-Za-z0-9\s*():/.",\-!_$@#%&~]+\*\/\n?/
    ]
   }),
   ...
  ]
};

options

  • comments comment string or RegExp list, default is [/^\/\*[A-Za-z0-9\s*():/.",\-!_$@#%&~]+\*\/\n?/].

  • test - remove files filter, default is /\.js($|\?)/i.

Dependencies (0)

    Dev Dependencies (31)

    Package Sidebar

    Install

    npm i webpack-clean-comments-plugin

    Weekly Downloads

    1

    Version

    0.0.2

    License

    none

    Unpacked Size

    11.4 kB

    Total Files

    5

    Last publish

    Collaborators

    • gxlmyacc