Shinzie
Shinzie

Reputation: 15

What is a good way to prevent file getting renamed when running npm run build

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.

Upvotes: 0

Views: 61

Answers (0)

Related Questions