diff options
author | 2024-04-12 01:09:33 +0200 | |
---|---|---|
committer | 2024-04-12 01:09:33 +0200 | |
commit | c3a78c6f11a4a489f0eb0d6b6a88a8535a168386 (patch) | |
tree | f169b55d001ab80c3bddcb948275d48418a6dab4 /subprojects/docs/src/plugins | |
parent | docs: add link to WASP (diff) | |
download | refinery-c3a78c6f11a4a489f0eb0d6b6a88a8535a168386.tar.gz refinery-c3a78c6f11a4a489f0eb0d6b6a88a8535a168386.tar.zst refinery-c3a78c6f11a4a489f0eb0d6b6a88a8535a168386.zip |
refactor(frontend): improve SVG minification
Diffstat (limited to 'subprojects/docs/src/plugins')
-rw-r--r-- | subprojects/docs/src/plugins/loadersPlugin.ts | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/subprojects/docs/src/plugins/loadersPlugin.ts b/subprojects/docs/src/plugins/loadersPlugin.ts index 28474511..325d7f67 100644 --- a/subprojects/docs/src/plugins/loadersPlugin.ts +++ b/subprojects/docs/src/plugins/loadersPlugin.ts | |||
@@ -50,9 +50,23 @@ export default function loadersPlugin(): Plugin { | |||
50 | } | 50 | } |
51 | loader.options = { | 51 | loader.options = { |
52 | ...(typeof loader.options === 'object' ? loader.options : {}), | 52 | ...(typeof loader.options === 'object' ? loader.options : {}), |
53 | // Disable SVGO, because it interferes styling figures exported from Refinery with CSS. | 53 | svgo: true, |
54 | svgo: false, | 54 | svgoConfig: { |
55 | svgoConfig: undefined, | 55 | plugins: [ |
56 | { | ||
57 | name: 'preset-default', | ||
58 | params: { | ||
59 | overrides: { | ||
60 | removeTitle: false, | ||
61 | removeViewBox: false, | ||
62 | // Disable SVGO, because it interferes styling figures exported from Refinery with CSS. | ||
63 | inlineStyles: false, | ||
64 | cleanupIds: false, | ||
65 | }, | ||
66 | }, | ||
67 | }, | ||
68 | ], | ||
69 | }, | ||
56 | }; | 70 | }; |
57 | svgoDisabled = true; | 71 | svgoDisabled = true; |
58 | }); | 72 | }); |