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
Cache is not invalidated after babelrc is created #1359
Comments
The cache invalidating currently only triggers on file update not file creation. (file refers to .babelrc config) I'm a bit confused after reading your issue, did it happen on creation or update? |
That explains it then, it was on creation. You can see in the steps of the demo project that the file doesn't exist on first build, is created and rebuilt, and there's no cache change. I've updated the title and report, sorry for the confusion there. |
I assume the cache should be invalidated too when the |
|
@DeMoorJasper I'd love to tackle this. Can you give me a hint where to start? I thought about subscribing to every file which gets created inside the project root and check if the filename equals to |
Waiting on this babel PR to be released and then we should be able to implement this: babel/babel#11906. |
🐛 bug report
Build cache is not updated when
.babelrc
file is created. Specifically for my use-case,transform-react-jsx.pragma
setting is not respected.🎛 Configuration (.babelrc, package.json, cli command)
File to add after the initial build
🤔 Expected Behavior
When restarting parcel, specified pragma for JSX files should be used.
😯 Current Behavior
The first build will produce a cache which uses the default React pragma setting; after creating the
.babelrc
file, the next build will emit the same error.💁 Possible Solution
Invalidate the cache after
.babelrc
is added to the project.🔦 Context
I was beginning a new project where I installed parcel and set up an initial JSX component with mithril. As always, I forget to create a
.babelrc
file, and realise this when the first build displays this error. After adding the file and re-launching parcel, I expected the build to be fixed.See the demo project for full context.
💻 Code Sample
Steps and demo assets available here: https://github.com/Codesleuth/parcel-babelrc-rebuild-bug
🌍 Your Environment
YarnThe text was updated successfully, but these errors were encountered: