UNPKG

602 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3class StaticAssetPlugin {
4 constructor(name, contents) {
5 this.name = name;
6 this.contents = contents;
7 }
8 apply(compiler) {
9 compiler.plugin('emit', (compilation, cb) => {
10 compilation.assets[this.name] = {
11 size: () => this.contents.length,
12 source: () => this.contents,
13 };
14 cb();
15 });
16 }
17}
18exports.StaticAssetPlugin = StaticAssetPlugin;
19//# sourceMappingURL=/users/hansl/sources/angular-cli/plugins/static-asset.js.map
\No newline at end of file