From ae40467468fc8dbe6497ace98b5c857753c9777b Mon Sep 17 00:00:00 2001 From: Juan M Date: Tue, 30 Jan 2024 06:06:53 -0300 Subject: [PATCH] Use @svgr/webpack to include SVGs --- docs/next.config.mjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/next.config.mjs b/docs/next.config.mjs index dc10519a..051e1759 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -5,4 +5,12 @@ const withNextra = nextra({ themeConfig: './theme.config.tsx', }); -export default withNextra({}); +export default withNextra({ + webpack(config) { + config.module.rules.push({ + test: /\.svg$/, + use: [{ loader: '@svgr/webpack', options: { icon: true } }], + }); + return config; + }, +});