Please add example on using .babelrc settings (by using cacheIdentifier?)
See original GitHub issuecacheIdentifier
: Default is a string composed by the babel-core’s version, the babel-loader’s version, the contents of .babelrc
file if it exists and the value of the environment variable BABEL_ENV
with a fallback to the NODE_ENV
environment variable. This can be set to a custom value to force cache busting if the identifier changes.
Sounds like I could use cacheIdentifier
to use my babel settings defined in .babelrc
but not sure how to use it. Please advice 😃
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Configure Babel
Create a file called babel.config.json with the following content at the root of ... for example a dynamic configuration based on the process...
Read more >Demystifying and Setting up .babelrc | by Anshu Singh
This plugin transforms es2015 static class properties as well as properties declared with the es2016 property initializer syntax. Below is an ...
Read more >How to specify cacheDirectory option when using babel ...
I can't figure out how to use it with the following webpack setup: var compiler = webpack( { context: path.resolve( __dirname + "/../../"...
Read more >babel-loader | Yarn - Package Manager
This README is for babel-loader v8/v9 with Babel v7 If you are using legacy Babel v6, see the 7.x branch docs. NPM Status...
Read more >Babel Loader for Webpack - Morioh
This package allows transpiling JavaScript files using Babel & webpack. webpack 4.x ... Within your webpack configuration object, you'll need to add the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Tried that, you end up with:
It does not look like you can set a fixed location.You can set a base
.babelrc
using:Tested on Babel 8. Perfect if you are importing from outside the current working directory.
@loganfsmyth I’ve not been able to getbabel-loader@8.0.5
to recognize my.babelrc
files in my app folder. I run webpack from my project root and I have a project setup like this:~~The full project has more folders and more
.babelrc
files, which is why I’m usingbabel.config.js.
~~From what I understand Babel-Loader should pick up the .babelrc in the app/desktop folder from what I can tell, but instead I get errors resulting from none of the plugins/presets being defined. I’ve been defining these in parallel in my webpack config, but I’m trying to dry things up.I didn’t want to make a new issue for something that’s already been discussed to death, but I also can’t find a solution among any of the discussions. If you have any ideas I’d really appreciate it!Looks like my problem is probably with on of my
.babelrc
files