mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-19 20:17:06 +02:00
fix(core): restore core svg file-loader (#10820)
This commit is contained in:
parent
35259521e0
commit
97690abc94
8 changed files with 56 additions and 15 deletions
|
@ -43,6 +43,7 @@ type FileLoaderUtils = {
|
|||
};
|
||||
rules: {
|
||||
images: () => RuleSetRule;
|
||||
svgs: () => RuleSetRule;
|
||||
fonts: () => RuleSetRule;
|
||||
media: () => RuleSetRule;
|
||||
otherAssets: () => RuleSetRule;
|
||||
|
@ -119,6 +120,15 @@ function createFileLoaderUtils({
|
|||
test: /\.(?:ico|jpe?g|png|gif|webp|avif)(?:\?.*)?$/i,
|
||||
}),
|
||||
|
||||
/**
|
||||
* The SVG rule is isolated on purpose: our SVGR plugin enhances it
|
||||
* See https://github.com/facebook/docusaurus/pull/10820
|
||||
*/
|
||||
svgs: () => ({
|
||||
use: [loaders.url({folder: 'images'})],
|
||||
test: /\.svg$/i,
|
||||
}),
|
||||
|
||||
fonts: () => ({
|
||||
use: [loaders.url({folder: 'fonts'})],
|
||||
test: /\.(?:woff2?|eot|ttf|otf)$/i,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue