I have an App and I can not deploy to Firebase when I add this line to the code:
<Switch>
<Route path='/:name' component={Business} />
</Switch>
The data is rendering perfectly if I see it on my editor online Stackblitz or localhost, but I cannot deploy just because of that.
Here is the standard App code:
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import Business from './pages/business';
function App() {
return (
<Switch>
<Route path='/:name' component={Business} />
</Switch>
);
}
export default App;
I can deploy if I change the Switch and Route part to for example:
<div>
<h4>Hello World!</h4>
<p>Start editing to see some magic happen :)</p>
</div>
So I think must be an incompatibility with Firebase. Any Idea?
The Stackblitz panel stuck like the picture attached.
[![enter image description here][2]][2]