diff --git a/config/loaders/markup.js b/config/loaders/markup.js index d673923..3762df4 100644 --- a/config/loaders/markup.js +++ b/config/loaders/markup.js @@ -11,6 +11,11 @@ const markup = { loader: "html-loader", options: { minimize: NODE_ENV === "production", + sources: { + urlFilter: (attribute, value) => { + return !(attribute === "xlink:href" && /sprite\.svg/.test(value)); + }, + }, }, }, ], diff --git a/config/plugins/html.js b/config/plugins/html.js index 7d057dd..2e20a2a 100644 --- a/config/plugins/html.js +++ b/config/plugins/html.js @@ -103,7 +103,7 @@ const getPageInstanceRecursively = (page) => { posthtmlImageSources({ replaceExtension: true, classIgnore: ["u-no-picture-wrap"], - extensionIgnore: ["svg"], + extensionIgnore: ["svg", "gif"], }) ) .process(content, { sync: true });