Code Monkey home page Code Monkey logo

Comments (4)

chiplay avatar chiplay commented on May 21, 2024

@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.

chiplay avatar chiplay commented on May 21, 2024

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.

chiplay avatar chiplay commented on May 21, 2024

@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.

vshjxyz avatar vshjxyz commented on May 21, 2024

Hey, check #7 out 😄

from appcache-webpack-plugin.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.