@eaglesong/task-panorama
Version:
Eaglesong task for Panorama
23 lines • 797 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
function emitLoader(content) {
this.cacheable(false);
const compilation = this._compilation;
const module = this._module;
compilation.hooks.optimizeChunkAssets.tap('emit-loader', chunks => {
chunks.forEach(chunk => {
if (!chunk.canBeInitial() || !chunk.containsModule(module))
return;
chunk.files.forEach(file => {
const manifest = content;
compilation.assets[file] = {
size: () => Buffer.byteLength(manifest, 'utf8'),
source: () => manifest,
};
});
});
});
return '';
}
exports.default = emitLoader;
//# sourceMappingURL=emit-loader.js.map
;