sndyuk/mangle-css-class-webpack-plugin

Wrong files published on npm with v5.0.6

pxDot opened this issue · 1 comments

pxDot commented

It seems like the npm version and source on github do not match. When installing v5.0.6 I get the following lines which are causing an error (because of the uppercase typo in the Compilation argument):

class Plugin {
  constructor(opts = {}) {
    this.opts = opts;
  }

  apply(compiler) {
    compiler.hooks.compilation.tap(
      'MangleCssClassPluginHooks',
      (compilation) => {
        compilation.hooks.processAssets.tapAsync({
          name: 'MangleCssClassPluginOptimizeChunkAssetsHooks',
          stage: Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE,
        }, runner(compiler, compilation, this.opts));
      }
    );
  }
}

It should be:

class Plugin {
  constructor(opts = {}) {
    this.opts = opts;
  }

  apply(compiler) {
    compiler.hooks.compilation.tap(
      'MangleCssClassPluginHooks',
      (compilation) => {
        compilation.hooks.processAssets.tapAsync('MangleCssClassPluginOptimizeChunkAssetsHooks', runner(compiler, compilation, this.opts));
      }
    );
  }
}

@squareloop1 Thanks! I've just released 5.0.7.