-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
docs(assets): add note to inlining SVG through url() #15534
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
This just fixed my 2h bug hunting quest. Thanks! |
sapphi-red
reviewed
Mar 1, 2024
Co-authored-by: 翠 / green <green@sapphi.red>
sapphi-red
reviewed
Mar 2, 2024
sapphi-red
approved these changes
Mar 2, 2024
patak-dev
approved these changes
Mar 3, 2024
jeremywiebe
added a commit
to Khan/perseus
that referenced
this pull request
Apr 1, 2024
## Summary: Mark noticed that the new @phosphor icons were not showing up in Storybook on Github Pages (`khan.github.com/pereseus`). I tracked it down to a feature introduced in Vite 5 (vitejs/vite#15534), but it seems like it has bugs ([#15378](vitejs/vite#15378) and [#15444](vitejs/vite#15444)). I don't see how we could "quote" the URL as it's handed of to Wonder Blocks which seems to be handling the import correctly. So instead we'll just force Vite to never inline SVGs using Vite's `assetsInlineLimit` (https://vitejs.dev/config/build-options#build-assetsinlinelimit) option. Issue: LEMS-1887 ## Test plan: I haven't tested on GH Pages yet, but I did the following and verified that there are now svg files in the build output folder: ```sh yarn build-storybook ls storybook-static/assets ``` Author: jeremywiebe Reviewers: benchristel, jeremywiebe, mark-fitzgerald Required Reviewers: Approved By: benchristel Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Extract i18n strings (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: #1136
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
related #15378
related #15444
Since PR #14643, inlining SVG requires double quotes to correctly parsed on build.
There was no documentation around that, and there were 2 issues regarding it.
I have added a "note" with an example that was brought up in the issue.
TO-BE
Additional context
I wanted to put a
styled-component
example, however, eslint forced the double-quotes to convert back to single-quotes and the spacing between code blocks wasn't pretty. So, I erased thestyled-component
one.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).