0

The sprite is missing the path and other properties in the dist folder after running npm run build. Before the command and minification, sprite works fine in local host and deployment (I use parcel v2). If I click the specified sprite link directly on the index.html generated in dist folder, it says the file is missing but the file is present with just <svg width="0" height="0" class="hidden"/> no paths or other properties

Here is my package.json

 "name": "rainify---vanilla-website",
 "version": "1.0.0",
 "scripts": {
 "dev": "parcel index.html",
 "build": "parcel build index.html",
 "test": "echo \"Error: no test specified\" && exit 1"
 },
 "keywords": [],
 "author": "",
 "license": "ISC",
 "description": "",
 "devDependencies": {
 "parcel": "^2.13.3",
 "svgo": "^3.3.2"
 }
}```
Updated parcel. Without minification it works fine. The deployed and local host also exhibits the same behavior without sprite. 
my live website: https://dreamy-cassata-bcf9c3.netlify.app/
asked Jan 2, 2025 at 15:17
3
  • missing svg namespace perhaps? Commented Jan 2, 2025 at 15:26
  • It's already there in the source but I tried it inline still the same Commented Jan 2, 2025 at 16:21
  • I imagine it is but according to the sample output you've included, you're stripping it out (along with everything else in the file). Commented Jan 2, 2025 at 16:59

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.