question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't disable cache with BABEL_DISABLE_CACHE=1

See original GitHub issue

I’m submitting a bug report

Webpack Version: 2.5.1

Babel Core Version: 6.22.1

Babel Loader Version: 6.2.10

Please tell us about your environment: OS X

Current behavior: Babel-loader will cache the results from the first build and continue to read from them for future builds, even when BABEL_DISABLE_CACHE=1 is defined.

e.g.: "dev": "BABEL_DISABLE_CACHE=1 webpack-dev-server"

Expected/desired behavior: No cache should be used at all. All code should be re-compiled every time.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.

BABEL_DISABLE_CACHE=1 webpack-dev-server

  • What is the expected behavior? No cache to be used on future builds.

  • What is the motivation / use case for changing the behavior? I don’t want my stuff cached.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
loganfsmythcommented, Sep 2, 2018

Currently Babel will invalidate the cache when you change your config or the file content, but otherwise deleting the cache folder is the best way to entirely clear it. As I noted in https://github.com/babel/babel-loader/issues/453#issuecomment-302295145, babel-loader just depends on the cacheDirectory value so you can always use that + an environment variable to toggle caching on your own.

I’ve also filed https://github.com/babel/babel/issues/8497 which we’ll explore for the preval case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disable babel-loader caching in create-create-app ...
After digging a little, I discovered that dependencies are now cached in node_modules/. cache/babel-loader . Is there a way to disable cache ......
Read more >
Configuring the Apollo Client cache - Apollo GraphQL Docs
To disable normalization for a type, define a TypePolicy for the type (as shown in Customizing cache IDs) and set the policy's keyFields...
Read more >
Disable cache for 1 page : r/drupal - Reddit
The issue I have with this is that I don't see the thank you copy until i completely clear cache. How do I...
Read more >
Cache - webpack
Cache the generated webpack modules and chunks to improve build speed. cache is set to type: 'memory' in development ... To disable caching...
Read more >
customize-cra-disable-babel-cache - npm
This is a [customize-cra](https://github.com/arackaf/customize-cra) addon to disable babel-loader cache.. Latest version: 0.0.2, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found