atlassian-webresource-webpack-plugin
Version:
Auto-generates web-resource definitions from your webpacked code, for usage in an Atlassian product or plugin.
21 lines • 940 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.hookIntoCompileDoneToGenerateReports = exports.hookIntoNormalModuleFactory = void 0;
const hookIntoNormalModuleFactory = (stageName, compiler, cb) => {
compiler.hooks.compile.tap(stageName, (params) => {
const hooks = params.normalModuleFactory.hooks;
const passThruFactory = (data, callback) => callback();
hooks.factorize.tapAsync({
name: stageName,
stage: 99,
}, cb(passThruFactory));
});
};
exports.hookIntoNormalModuleFactory = hookIntoNormalModuleFactory;
const hookIntoCompileDoneToGenerateReports = (stageName, compiler, cb) => {
compiler.hooks.done.tapAsync(stageName, (stats, callback) => {
cb(stats.compilation, callback);
});
};
exports.hookIntoCompileDoneToGenerateReports = hookIntoCompileDoneToGenerateReports;
//# sourceMappingURL=WebpackRuntimeHelpers.js.map
;