GithubHelp home page GithubHelp logo

Comments (6)

vihanb avatar vihanb commented on May 28, 2024

The plugin has no option whether babel caches or not so likely the only option would be to have a config option which dynamically generates imports.

from babel-plugin-wildcard.

gaurav- avatar gaurav- commented on May 28, 2024

@vihanb it would be great if there's a fix for this. Other similar plugins have been unable to fix the same issue:

from babel-plugin-wildcard.

vihanb avatar vihanb commented on May 28, 2024

I suppose we could attempt to rm -r node_modules/.cache/babel-loader I'll look into it though, as I am not sure about the location in global vs local installs

from babel-plugin-wildcard.

vihanb avatar vihanb commented on May 28, 2024

now, if you install the plugin globally (or in a NPM script), you can use bpwc clear-cache and it'll locate cache files and delete them. If you are using babel-loader for testing or something, you can add this command in your test script

from babel-plugin-wildcard.

gaurav- avatar gaurav- commented on May 28, 2024

@vihanb is it clearing the entire babel cache or only the parts specific to wildcard imports? Ideally the latter is desirable (if possible) IMO because then it wouldn't drastically slow down the transpilation after calling clear-cache.

from babel-plugin-wildcard.

vihanb avatar vihanb commented on May 28, 2024

@gaurav- If you are in the root directory of your project it will delete the cache for that project. That said, Babel seems to often keep most of the cache for all files in one file and there doesn’t seem to be docs for the format which it’s kept in, also I’m not sure if that format will be stable across Babel versions. For that reason it will sometimes clear the global Babel cache too.

from babel-plugin-wildcard.

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.