0

I have changed to basename to be '/test'

now I could not open local images that in the same folder

history.ts

import { History, createBrowserHistory } from 'history';

export const history: History = createBrowserHistory({
  basename: '/test'
});

from home.tsx ( this is not working)

  <img width="100%" height="600px" alt="" src="./image.jpg" />

how can I make sure local images will use the base images also

Tuz
  • 1,810
  • 5
  • 29
  • 58

1 Answers1

0

I found 2 possible solution

  1. use require <img width="100%" height="600px" alt="" src="{require("./image.jpg")}" />

  2. update the manifest.json with start_url="/basename"

  3. add "hompage":"/basename" to package.json

Tuz
  • 1,810
  • 5
  • 29
  • 58