Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spriteFilePath to loader output #113

Closed
patrikholcak opened this issue Jul 22, 2024 · 1 comment
Closed

Add spriteFilePath to loader output #113

patrikholcak opened this issue Jul 22, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request Stale

Comments

@patrikholcak
Copy link

Is your feature request related to a problem? Please describe.
First off, thanks for the other changes you made! 🙏

#110 allowed interpolating filenames, but if you add a [hash] or [contenthash] to the file name, you then don’t know the path/url, because it changes with every file change.

Describe the solution you'd like
TL:DR; Other plugins include a path attribute on the imported resource which contains the sprite filename

My usecase is I have a hybrid (icon-heavy) react + .NET app. FE imports the svgs & renders them. I also use WebpackAssetsManifest which outputs a JSON with all emitted resources after the build. This JSON is imported on BE, which might render some html templates and can use this sprite to render an icon.

Describe alternatives you've considered
Removing hash param from name works, but that then might cache the resulting sprite

Additional context

@vadymshymko vadymshymko self-assigned this Jul 23, 2024
@vadymshymko vadymshymko added the enhancement New feature or request label Jul 23, 2024
@github-actions github-actions bot added the Stale label Aug 7, 2024
@patrikholcak
Copy link
Author

Not stale :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

2 participants