-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Webpack]Error report of introducing SVG file into img tag ? Please refer to the screenshot. #486
Comments
Hi, please let me know how can I reproduce the issue. Ideal would be to provide a repo with webpack configured and the image under question, where I can run something and see the error. Otherwise I have no idea what can be wrong. |
In webpack config: in html: |
What is your webpack version? |
4.11.1 |
@xiang0308 to be honest I don't understand your repo setup. Webpack does not parse HTML and you say that you have That's why my first reaction was to provide a repo where everything is configured and where I can reproduce the error. Basic use cases are covered by tests in this repo, so I am confident they work. |
This error happened to me. I have a scss with the content: .icon-compose.toolbar-menu-icon::before {
content: url('./img/compose.svg');
} The svg in question is this: @bhovhannes can you please check if this error occur to you? |
@wesleybl please provide a minimal sample repo illustrating the issue, so I can investigate further. So I can run |
@bhovhannes the error occurred to me in this repository: https://github.com/collective/collective.cover/tree/master/webpack The webpack configuration in this repository at tag https://github.com/collective/sc.recipe.staticresources/tree/1.1b5 See: https://github.com/collective/collective.cover/blob/master/webpack/package.json#L28 For now I'm using It still doesn't have svg, but just insert it, as said in the previous comment. The output images will be in the directory: https://github.com/collective/collective.cover/tree/master/src/collective/cover/browser/static Any questions just ask. |
@wesleybl can you please remove all non-relevant stuff, leave only one small *.scss file with the content you posted here, with the That will help a lot, as it will become a failing unit test which will be added to existing test suite. |
@bhovhannes you don't have to worry about python code. All you need is https://github.com/collective/collective.cover/tree/master/webpack and do:
|
@wesleybl I know you provided all links which can be put together to reproduce the problem. However, I repeat:
The reason is I need to see webpack configuration, source code (*.svg file, *.scss file) and the build command together, in one place to be able to debug and provide a solution. Unless I won't be sure I have reproduced your case correctly. And I don't want to spend time on fixing something unrelated to the problem you are experiencing. Providing a minimal repo to reproduce the problem is something many open-source packages demand. To summarize, I believe that:
Thanks for understanding! |
@bhovhannes I'm pretty sure the problem could be one of unsatisfied dependency. I get for example:
I'll try to update the versions, to see if it works. If it doesn't work, I create the repository for testing. Thanks! |
The text was updated successfully, but these errors were encountered: