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/
-
missing svg namespace perhaps?Robert Longson– Robert Longson2025年01月02日 15:26:56 +00:00Commented Jan 2, 2025 at 15:26
-
It's already there in the source but I tried it inline still the sameRain_lust– Rain_lust2025年01月02日 16:21:53 +00:00Commented 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).Robert Longson– Robert Longson2025年01月02日 16:59:35 +00:00Commented Jan 2, 2025 at 16:59
lang-html