thmsgbrt / Chrome-Extension-with-React-and-Typescript-Starter-Pack

Chrome Extension with React and Typescript Starter Pack
https://medium.com/@th.guibert/create-a-chrome-extension-using-react-and-typescript-50e94e14320c
124 stars 25 forks source link

Relative path issue in react popup? #14

Closed djMax closed 4 years ago

djMax commented 4 years ago

I'm getting a blank screen on the popup, and I think it's because the paths in the compiled index.html are like this:

  <link href="/static/css/main.5f361e03.chunk.css" rel="stylesheet">
  <script src="/static/js/runtime-main.e6ce7b14.js"></script>

But that's not right, because they are in /popup/static/...

thmsgbrt commented 4 years ago

Hi @djMax ,

Indeed, you need to add the following to the package.json of the popup "homepage": "."

It must have been removed when I updated CRA somehow... I'm sorry and thanks for reporting the issue.