Cue
Question about image tag and svgs in production
For example, I often put CSS files in there, and add those files to the nuxt config. Those files may also reference images for backgrounds, fonts, so on. There may be static images I’m using like a logo, etc.
15 replies
Question about image tag and svgs in production
Common media, images and font types that you’re explicitly referencing, otherwise referred to as static assets. That is, using the
~/assets/**/[file].[ext]
syntax in their expected locations such as an images src attribute, a url CSS directive, so on.15 replies
Question about image tag and svgs in production
If you want to load dynamically, and you know those files will exist, then public is exactly where you want to place them.
Importing assets isn’t hacky. It’s hinting to the bundler what files you’re going to be using ahead of time, because bundlers do not evaluate your dynamic URL therefore has no idea what combinations you’re going to throw at it. This is all avoidable with public files.
15 replies
yt resources for learning vue
Try https://youtube.com/@thealexlichter?si=kLRDGhP2zNjVn1WH, you’re going to enjoy his videos. I also reckon he could take Daniel Roe in a fight.
7 replies