Estoy usando mapas de folletos de reacción y los importé y los llamé en mi aplicación de reacción. Me esta dando este error. Ya cargué los scripts CSS y JS proporcionados en mi archivo index.html. Cualquier ayuda será apreciada.
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) { > const options = props.pathOptions ?? {}; | element.instance.setStyle(options); | optionsRef.current = options;También revisé un nuevo proyecto de reacción. A continuación se adjunta el código.
import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet"; function App() { return ( <div style={{ height: "180px", }} > <MapContainer center={[51.505, -0.09]} zoom={13} scrollWheelZoom={false}> <TileLayer attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" /> <Marker position={[51.505, -0.09]}> <Popup> A pretty CSS3 popup. <br /> Easily customizable. </Popup> </Marker> </MapContainer> </div> ); } export default App;