Rebuild dist with changes
This commit is contained in:
parent
622f13252b
commit
95b2888cfa
1 changed files with 13 additions and 3 deletions
16
dist/WebpackAutoInjectVersion.js
vendored
16
dist/WebpackAutoInjectVersion.js
vendored
|
@ -643,22 +643,32 @@ var InjectByTag = function () {
|
||||||
for (var basename in compilation.assets) {
|
for (var basename in compilation.assets) {
|
||||||
// only if match regex
|
// only if match regex
|
||||||
if (_this.context.config.componentsOptions.InjectByTag.fileRegex.test(basename)) {
|
if (_this.context.config.componentsOptions.InjectByTag.fileRegex.test(basename)) {
|
||||||
(function () {
|
var _ret = function () {
|
||||||
var replaced = 0;
|
var replaced = 0;
|
||||||
var asset = compilation.assets[basename];
|
var asset = compilation.assets[basename];
|
||||||
var modFile = asset.source().replace(/(\[AIV\]{version}\[\/AIV\])/g, function () {
|
|
||||||
|
var originalSource = asset.source();
|
||||||
|
if (!originalSource || typeof originalSource.replace !== 'function') {
|
||||||
|
return 'continue';
|
||||||
|
}
|
||||||
|
|
||||||
|
var modFile = originalSource.replace(/(\[AIV\]{version}\[\/AIV\])/g, function () {
|
||||||
replaced++;
|
replaced++;
|
||||||
return _this.context.version;
|
return _this.context.version;
|
||||||
});
|
});
|
||||||
|
|
||||||
asset.source = function () {
|
asset.source = function () {
|
||||||
return modFile;
|
return modFile;
|
||||||
};
|
};
|
||||||
_log2.default.info('InjectByTag : match : ' + basename + ' : replaced : ' + replaced);
|
_log2.default.info('InjectByTag : match : ' + basename + ' : replaced : ' + replaced);
|
||||||
})();
|
}();
|
||||||
|
|
||||||
|
if (_ret === 'continue') continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
|
||||||
return new _promise2.default(function (resolve, reject) {
|
return new _promise2.default(function (resolve, reject) {
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue