apply(compiler) {
    const NAME = WebpackProtectBootstrapPlugin.name;
    compiler.hooks.compilation.tap(NAME, (compilation) => {
      const hooks = webpack.javascript.JavascriptModulesPlugin.getCompilationHooks(compilation);
      hooks.renderMain.tap(NAME, replace.bind(null, MAIN_RULES));
    });
  }
WARNING! The following globals must be correctly assigned using wrapper-webpack-plugin.
toStringTagSym = Symbol.toStringTag
defineProperty = Object.defineProperty
hasOwnProperty = Object.prototype.hasOwnProperty
safeCall = Function.prototype.call.bind(Function.prototype.call)