nuxt-modules / svg-sprite

Optimize SVG files and combine them into sprite
https://codesandbox.io/s/github/nuxt-community/svg-sprite-module/
MIT License
300 stars 42 forks source link

Fix for input and output values that include nuxt aliases #309

Open AndriiGera opened 9 months ago

AndriiGera commented 9 months ago

This PR includes a fix for incorrect resolve of input and output configuration values with nuxt aliases. Correspondent bug reports:

307

295

volkanakkus commented 9 months ago

Hello, we're also waiting this PR because we have to use srcDir property in nuxt.config.ts, that's why we would be appreciated if you prioritize the PR.

Thanks!

AndriiGera commented 9 months ago

I've published fork with this PR as a separate package. You can temporarily replace current svg-sprite module with it. To install: yarn add @gvade/nuxt3-svg-sprite. Don't forget to change @nuxtjs/svg-sprite to @gvade/nuxt3-svg-sprite in your nuxt confg modules section. The configuration key remains the same as svgSprite. There was a bug with missing #svg-sprite-icons template if iconsPath option was set to false. This bug is fixed as well.

volkanakkus commented 8 months ago

@AndriiGera thanks for the package, It's now working great. And also can you add elementClass config to your package, because it's not working right now as you can see in following reports:

298

294

Thank you for your afford again, the developers of this module seems like they forget about existence of this module. They've just leave the development after Nuxt 3 update release.

AndriiGera commented 8 months ago

@volkanakkus Published a fix to elementClass and spriteClassPrefix options. Updated the ModuleOptions type. Here are the correspondent issues: https://github.com/nuxt-modules/svg-sprite/issues/298 https://github.com/nuxt-modules/svg-sprite/issues/284 You need to update the @gvade/nuxt3-svg-sprite package via your package manager.

volkanakkus commented 8 months ago

@AndriiGera so much thanks

volkanakkus commented 1 month ago

@AndriiGera, hello again, is it possible to update this pr with your fixes for elementClass and spriteClassPrefix options. This pr and your fork only has the commit of input output fix. That would be good if you can update the fix here as well.

Because I think there will be another bug which causes hydration problem, I'll try the fix that.

@volkanakkus Published a fix to elementClass and spriteClassPrefix options. Updated the ModuleOptions type. Here are the correspondent issues: #298 #284 You need to update the @gvade/nuxt3-svg-sprite package via your package manager.

AndriiGera commented 1 month ago

@AndriiGera, hello again, is it possible to update this pr with your fixes for elementClass and spriteClassPrefix options. This pr and your fork only has the commit of input output fix. That would be good if you can update the fix here as well.

Because I think there will be another bug which causes hydration problem, I'll try the fix that.

@volkanakkus yes, sure. Just updated.

mad-briller commented 1 month ago

@AndriiGera does your changeset fix the publicPath issue at all? we're hitting a problem where we can't serve the svg spritesheets from our cdn so need to serve from node

AndriiGera commented 1 month ago

@AndriiGera does your changeset fix the publicPath issue at all? we're hitting a problem where we can't serve the svg spritesheets from our cdn so need to serve from node

@mad-briller I think publicPath issue is not considered among these fixes. I'm not even sure what issue do you mean. Is there a bug report about it?