You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
@lettertwo right now all of my sourcemap files are getting included in the manifest as part of the production build. I definitely don't want users downloading those huge files :) Would the exclude solution your proposing above by the only way to solve my issue?
@lettertwo well, I went ahead and took a stab at it :) I'm terrible at coffeescript and decided to pull in underscore to make it a bit easier, but feel free refactor to use if you want:
Object.keys(compilation.assets).forEach(function(key) {
if (_.isArray(_this.include)) {
if (_.some(_this.include, function(exp) { return exp.test(key); })) appCache.addAsset(key);
return;
}
if (_.isArray(_this.exclude)) {
if (_.every(_this.exclude, function(exp) { return !exp.test(key); })) appCache.addAsset(key);
return;
}
appCache.addAsset(key);
});
Conversely, maybe allow only some assets to be included.
The text was updated successfully, but these errors were encountered: