Closed dkrutsko closed 6 years ago
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.
@vihanb it would be great if there's a fix for this. Other similar plugins have been unable to fix the same issue:
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
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
@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
.
@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.
Hey there, great plugin, however I'm having some issues using this with my webpack framework. When using
babel-loader
with thecacheDirectory
option and deleting some files within that directory, I get module not found errors. Deleting my babel-loader cache (node_modules/.cache/babel-loader
) or settingcacheDirectory
to false fixes this problem.