Bom dia! Ao fazer a alteração da aula, recebo o erro abaixo e nada corrige. Podem me ajudar, por favor?
Segue o código...
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import { createGlobalStyle } from 'styled-components';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
const GlobalStyle = createGlobalStyle`
body {
margin: 0;
font-family: sans-serif, Roboto, Ubuntu, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
li {
list-style: none;
}
`
const root = ReactDOM.createRoot( document.getElementById('root'));
root.render(
<React.StrictMode>
<GlobalStyle/>
<BrowserRouter>
<Routes>
<Route path='/favoritos' element={<p>Oi, você conseguiu</p>}/>
<Route path='/' element={<App/>}/>
</Routes>
</BrowserRouter>
</React.StrictMode>
);
Segue o erro...
Failed to compile.
Error in ./~/react-router-dom/dist/umd/react-router-dom.development.js
Module parse failed: /home/denise/Documentos/web-artigos-android/node_modules/react-router-dom/dist/umd/react-router-dom.development.js Unexpected token (488:77)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (488:77)
@ ./~/react-router-dom/dist/main.js 18:19-67