This repository has been archived by the owner on Aug 9, 2022. It is now read-only.
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
xiaohuoni
changed the title
feat: addd svg rules use svgo-loader
[WIP] feat: addd svg rules use svgo-loader
Sep 14, 2021
xiaohuoni
changed the title
[WIP] feat: addd svg rules use svgo-loader
feat: addd svg rules use svgo-loader
Sep 15, 2021
svgr 感觉不对,在 https://github.com/umijs/umi-next/tree/master/examples/bundler-webpack-demo 里试试看能不能渲染出 svg。 |
同时还要确认 svg 在 css 中使用是否正常。 |
是有问题,我修一下 |
遗留问题:生成的文件和大小都是正确的,但是引入组件的时候,是错误的
根据 Using svgr with webpack 5 上面的方法,并不能解决。还要再修复一下。 FIXED
|
…o feat-webpack-svg-rules # Conflicts: # packages/bundler-webpack/package.json # pnpm-lock.yaml
sorrycc
approved these changes
Oct 12, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
原本就支持 svg,使用 svgo 产物会更小。
使用 svgr 将 svg 资源直接变成可用的 react 组件
examples/bundler-webpack-demo