Comments (4)
@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?
from appcache-webpack-plugin.
I'm going to go ahead and use this in a fork unless your thinking about implementing this any time soon:
// Exclude sourcemap files from manifest
if (path.extname(key) !== '.map') appCache.addAsset(key);
from appcache-webpack-plugin.
@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);
});
from appcache-webpack-plugin.
Hey, check #7 out
from appcache-webpack-plugin.
Related Issues (13)
- Add output config
- incomplete manifest when webpack --watch HOT 5
- Exclude dotfiles automatically HOT 1
- support custom version format
- Output hashed filename
- Compatibility with webpack 3 HOT 3
- exclude option not working as expected with copy-webpack-plugin.
- Webpack 4.0 Support HOT 1
- iOS destroys cache after some time
- %5C in the path of assets
- Manifest file lists itsself HOT 3
- Multiple AppCachePlugin instances cause caching of the other caches! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appcache-webpack-plugin.