-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: @mango-scripts/react-scripts rsbuild模式增加对svg-sprite-loader和css-…
…module的支持
- Loading branch information
1 parent
0240219
commit 7cd22dc
Showing
4 changed files
with
77 additions
and
10 deletions.
There are no files selected for viewing
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 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
10 changes: 10 additions & 0 deletions
10
packages/react-scripts/src/rsbuild/loader/compat-svg-sprite-loader.mts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import svgSpriteLoader from 'svg-sprite-loader' | ||
|
||
function loader(this: any, source: string) { | ||
// svg-sprite-loader workaround for rspack, with no extract support. | ||
this._module = this._module || {} | ||
this.target = this.target || 'web' | ||
return svgSpriteLoader.call(this, source) | ||
} | ||
|
||
export default loader |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.