complete-intro-to-react-v5 icon indicating copy to clipboard operation
complete-intro-to-react-v5 copied to clipboard

SSR build start image error: SyntaxError: Invalid or unexpected token

Open MujunZ opened this issue 5 years ago • 1 comments

I've been playing around with the ssr branch and got some issue when using a image in the assets folder and run npm run start.

"App.js"

...
import logo from "../src/assets/image-logo.png";
...
<header>
          <img src={logo} alt="" />
          <Link to="/">Adopt Me!</Link>
</header>
....

Here's the error message image

It works well if I run npm run dev, but doesn't work when I run npm run start. I thought that's some babel issue, but couldn't figure it out.

Here's my branch for more information, the last commit is the change.

Please help. Thanks 🙇‍♀️

MujunZ avatar Feb 11 '20 03:02 MujunZ

having the same issue with CRA but SRR

Ayan-Ali avatar Jun 24 '21 13:06 Ayan-Ali