title: CRA + React Leaflet: failed to compile
body: <p>I've just started a brand new project using <code>create-react-app</code> and set up <code>react-leaflet</code> as their documentation recommends <a href="https://react-leaflet.js.org/docs/start-installation" rel="noreferrer">here</a>.</p>
  <p>I am trying to use <a href="https://react-leaflet.js.org/docs/start-setup" rel="noreferrer">this example</a> to check if it's all working good but then I'm receiving the following error:</p>
  <pre><code>./node_modules/@react-leaflet/core/esm/path.js 10:41
  Module parse failed: Unexpected token (10:41)
  File was processed with these loaders:
   * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js
  You may need an additional loader to handle the result of these loaders.
  |   useEffect(function updatePathOptions() {
  |     if (props.pathOptions !== optionsRef.current) {
  &gt;       const options = props.pathOptions ?? {};
  |       element.instance.setStyle(options);
  |       optionsRef.current = options;
  </code></pre>
  <p>Looks like <code>react-scripts</code> can't handle <code>react-leaflet</code> files.
  Can someone helps me to understand why it's happening and how do I fix it ?</p>