Using React Spring with older browsers

ES6 syntax in the bundle, coming from React Spring

How I managed to solve the issue

My Webpack configuration was excluding node_modules on purpose, since including all the modules can be an expensive process and I was starting from the assumption that my modules should be runnable without transpiling. My config looked like this:

exclude: /node_modules\/(?!react-spring)/
The new babel.config.js file
import 'core-js';

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Antonio Cosentino

Antonio Cosentino

Full-Stack Developer and Musician, based in Berlin. cosentino.dev