ardatan / meteor-webpack

https://medium.com/@ardatan/meteor-with-webpack-in-2018-faster-compilation-better-source-handling-benefit-from-bc5ccc5735ef
MIT License
123 stars 29 forks source link

.babelrc ignored when upgrading babel to a version greater than 7 #81

Open GabeDuarteM opened 4 years ago

GabeDuarteM commented 4 years ago

Hi 👋 👋

It's nice to see efforts to make an integration between meteor and webpack possible! On our company, we wanted to try this out, but we are getting some weird errors when updating babel to the latest version, and in fact, its the same problem as #22, but updating meteor and babel runtime did not solve in my case...

I have a reproducible repo at https://github.com/GabrielDuarteM/meteor-webpack-babel-error. It has basically 4 commits, the first being the exact clone of the example, second is bumping all npm packages besides the babel related ones, third is updating meteor and its packages, and fourth is after I ran npx babel-upgrade (the babel tool to update from version 6 to 7).

Up until the last commit (updating babel), everything was working fine (can be checked by running git reset HEAD^ --hard), but after it, I started getting the Unexpected token error on the <App />, typically suggesting that babel is not transpiling the React code. I tried renaming .babelrc to babel.config.js to see if it solves, but no luck on that. Also tried putting syntax errors inside the .babelrc, and the compiler didn't even complain, so I'd guess that the config is not being picked up at all.

Any idea of what it could be?

ghost commented 4 years ago

@ardatan Any chances you guys could take a look on this? It is really a pity we cannot use this package for Meteor projects with babel 7. Using an old version (babel 6) is not an option for us.