-
Notifications
You must be signed in to change notification settings - Fork 273
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
Import of SVG-file fails with extraction (returns undefined) #106
Comments
I found 3 issues:
Check my fork with updates - https://github.com/kisenka/svg-sprite-loader-test-case |
Hi! Thank you very much for your reply and your thorough help! I've taken note of the issues you found (sorry for the duplicate SpriteLoaderPlugin - my bad), and fixed them in recent commits. Furthermore, I've vastly simplified my test-case, e.g. by removing What I found was that using the beta-version removed the support for SpriteSymbol - instead a (system-relative) path is logged. If you have more time to debug, I've pushed my changes to the same repo as before. Thank you for your kind help and patience. |
I think I understand what you want - svg image should goes to external sprite, but symbol ( |
That is exactly what I want! :) Is that not the expected behavior? |
Basically not, but I'll think about it. However it can be done via custom runtime generator, it was created for cases when you need some special stuff :) I've added example with extract mode in interop branch:
|
This is great, thank you! I'm very grateful of your commitment and help. I'm still running into some issues with the sprite-loading though. More specifically, I cannot get the I've updated the test-case with the runtime generator, where it's evident that the For |
As I said here:
|
I've noted that. Unfortunately, this still returns the system-relative path instead of the build-relative path (i.e. If this is the expected behavior, it'd be lovely if you could give me a pointer for what to modify. |
That strange. Could you push latest changes in your repo so I can check? |
@kisenka I have the same problem as @wanecek got:
When
Output:
When
Output:
This is my test case repo |
@WalterZou could you please create repo with your setup? |
@kisenka Commits are pushed to the repository |
Got it, it's Windows path resolving issue. I will have access to Windows machine tomorrow, stay tuned! |
Excellent @kisenka! Thank you very much for your help |
@wanecek please check |
Works like a charm! Thank you for all your help Kisenka. |
With my current build-process, the
import
of an SVG-file returnsundefined
when extraction is turned on. with{ extract: off }
it returns an object as expected per documentation.I have created a reduced test-case, which I will hope assist the debugging process.
Details of my setup:
See package.json for further details.
To Reproduce:
npm start
. This should launch your web-browser athttp://localhost:3000
.undefined
is logged byShell.vue:12
, which attempts to log theimport
of./assets/arrow.svg
.build/webpack.base.conf.js:59
, setextract: true
and run the build process again.The text was updated successfully, but these errors were encountered: