You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature, report a bug or ask a question?
A bug/question
What is the current behavior?
Looks like svg-sprite-loader using with sprite loader plugin in extract mode doesn't work with pitching loaders
If the current behavior is a bug, please provide the steps to reproduce, at least part of webpack config with loader configuration and piece of your code.
Create custom webpack loader with pitching logic. For example, I want to use require('picture.svg') to require picture-dark.svg and picture-light.svg and generate sprite by svg-sprite-loader.
Custom loader very basic example: here
It works fine when I try to return module.exports = require(${JSON.stringify(darkPictureRequest)}), but when I'm going to pass more than one file to the svg-sprite-loader with extract option enabled, my next.js page is in state of constant loading.
If I understand correctly, there is a similar problem when using extract-text-webpack-plugin, because its loader also uses pitching, so its hooks are called inside the svg sprite plugin.
How can you advise me to change the loader so that everything works correctly?
Please tell us about your environment:
Node.js version: 14.17.4
webpack version: 5.1.0
svg-sprite-loader version: 6.0.9
OS type & version: macOS Mojave 10.14.6
The text was updated successfully, but these errors were encountered:
Do you want to request a feature, report a bug or ask a question?
A bug/question
What is the current behavior?
Looks like svg-sprite-loader using with sprite loader plugin in extract mode doesn't work with pitching loaders
If the current behavior is a bug, please provide the steps to reproduce, at least part of webpack config with loader configuration and piece of your code.
Create custom webpack loader with pitching logic. For example, I want to use require('picture.svg') to require picture-dark.svg and picture-light.svg and generate sprite by svg-sprite-loader.
Custom loader very basic example: here
It works fine when I try to return module.exports = require(${JSON.stringify(darkPictureRequest)}), but when I'm going to pass more than one file to the svg-sprite-loader with extract option enabled, my next.js page is in state of constant loading.
If I understand correctly, there is a similar problem when using extract-text-webpack-plugin, because its loader also uses pitching, so its hooks are called inside the svg sprite plugin.
How can you advise me to change the loader so that everything works correctly?
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: