Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to bust the Babel cache? #7

Open
callumlocke opened this issue Aug 17, 2017 · 2 comments
Open

How to bust the Babel cache? #7

callumlocke opened this issue Aug 17, 2017 · 2 comments

Comments

@callumlocke
Copy link

Thanks for this great plugin.

I'm getting a problem where it doesn't seem to pick up changes to the file being inlined. I have to edit the parent JS file to cachebust it. I think this is because the parent file is stuck in Babel's cache with the inlined string, and Babel doesn't know that the underlying file has changed.

Is there any solution to this? Currently I am having to make an arbitrary whitespace change in the parent file whenever I want to edit the child file. (Excuse terminology.)

@rgilling
Copy link

rgilling commented May 1, 2018

I am seeing this too with create-react-app development environment. Also if I'm reverting to an old version, it seems to cache based on the content of the file, it's not as simple as just recompiling. e.g. add a space, compile, it gets new content - remove that space, compile, it actually reverts to the original cache value. So it seems to be caching against some type of checksum or similar which makes it even harder on the workflow....

@jesobreira
Copy link

The workaround I'm using now consists in removing all the files on the node_modules/.cache/babel-loader folder. For OS X users it may be needed to use Cmd + Shift + . to show hidden folders (.cache).

It looks like it also happens to other similar plugins, such as kentcdodds/babel-plugin-preval#19, evenchange4/graphql.macro#6 and even babel/babel-loader#453.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants