0

I am running npm run build for production and this is my script code.

"scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview",
    "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
  },

Whenever I build, it changes all the files in my assets folder including all images. As a result, some images cannot be displayed because the filename doesn't match, however some images are automatically renamed in the code and can be displayed. I'm not sure how to solve this issue. Can anybody please provide a good way to deal with this problem? Cheers.

1
  • "filename doesn't match, however some images are automatically renamed in the code and can be displayed" - in which way? It's unclear why they can't be displayed. It's unclear what the problem is. Assets are imported, this makes them to use filenames from the current build. Commented Jul 6 at 10:26

0