Hey, I am using Nuxt 3 in ssr mode and I have a directory of svgs that are returning 404s on production because they are not being included in the build. They are being referenced dynamically from within a .scss file, so I'm guessing that its not including them as it doesn't read their explicit paths? Is there a way I can force the build to include these files?
Then I am using a mixin to add the list of icons to essentially create my own icon library
$icon-types: account, calendar;
// Generate type classes
@each $type in $icon-types {
.icon-#{$type} {
background-color: currentColor; //default to text color
display: inline-block;
width: 1rem;
height: 1rem;
mask-repeat: no-repeat;
mask-size: contain;
mask-position: center;
mask-image: url('~/assets/svgs/icons/#{$type}.svg');
}
}
There are obviously more than two icons in the list but just using 2 to illustrate my point. Does anyone know how I can make sure these get added to the build?
Hey, I am using Nuxt 3 in ssr mode and I have a directory of svgs that are returning 404s on production because they are not being included in the build. They are being referenced dynamically from within a .scss file, so I'm guessing that its not including them as it doesn't read their explicit paths? Is there a way I can force the build to include these files?
My code structure is:
Then I am using a mixin to add the list of icons to essentially create my own icon library
There are obviously more than two icons in the list but just using 2 to illustrate my point. Does anyone know how I can make sure these get added to the build?
Relevant package versions:
Nuxt.config.js: