Skip to content

[7.0] Default babel-register cache location to node_modules #5198

@hzoo

Description

@hzoo

why: easier to find since it's in node_modules, easy to clear all cache for all the tools that use it.

Move register cache file location to ./node_modules/.cache/babel-register via

https://github.com/avajs/find-cache-dir

Ref previous babel-loader PR: https://github.com/babel/babel-loader/pull/301/files as well as the current file (https://github.com/babel/babel-loader/blob/e9e37029e0c5905d8846f69d9a0c348f3d49fe50/src/fs-cache.js#L170), https://github.com/babel/babel-loader/pull/318/files


  • Comment below you are going to do this (for others to know)
  • Read CONTRIBUTING.md (make sure you have yarn, and are on at least node 4)
  • Check you are on 7.0 branch with git checkout 7.0 and then make a branch off of that to PR
  • remember to run make build after a source code change or better just run make watch in another terminal window to auto run babel while you are developing
  • Default to findCacheDir({ name: "babel-register" }) and fallback to os/home/tmp dir.
  • if there are already tests setup for that package, write another test (otherwise we'll do it or help)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions