Giter VIP home page Giter VIP logo

Comments (8)

jdeniau avatar jdeniau commented on May 31, 2024 1

For the record, I do not use cache-loader anymore, as webpack does a fine job now like @evilebottnawi said.

from cache-loader.

alexander-akait avatar alexander-akait commented on May 31, 2024

@jdeniau need tests mtime vs md4 from hash content. PR welcome 👍

from cache-loader.

LukeSheard avatar LukeSheard commented on May 31, 2024

Maybe this could be slightly more generic, can supply a custom compare function for the comparison callback?

from cache-loader.

luislobo avatar luislobo commented on May 31, 2024

👍 for the PR made by @LukeSheard

from cache-loader.

bencoveney avatar bencoveney commented on May 31, 2024

My diagnosis might not be correct, but I think this problem is impacting us as well. We have some custom loaders in our project written in TypeScript. When we run a build, we compile the TypeScript to JavaScript before running webpack - giving the custom loaders a new mtime. The loaders are added as dependencies by cache-loader, thus we can never get cached content.

Any chance the PR from @LukeSheard could be revived?

from cache-loader.

sibelius avatar sibelius commented on May 31, 2024

is this fixed?

from cache-loader.

alexander-akait avatar alexander-akait commented on May 31, 2024

@sibelius no, cache-loader is low priority due webpack@5 will have built-in cache, anyway if you want to fix something PR welcome

from cache-loader.

scottrippey avatar scottrippey commented on May 31, 2024

I attempted to workaround this by comparing based on ctime, but unfortunately only mtime is stored in the cache.

So ultimately, I went with the approach recommended in webpack's docs: use a postinstall hook to remove the node_modules/.cache/cache-loader folder.

https://webpack.js.org/guides/build-performance/#persistent-cache

from cache-loader.

Related Issues (20)

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.