Skip to content

Commit

Permalink
Use @svgr/webpack to include SVGs
Browse files Browse the repository at this point in the history
  • Loading branch information
jm42 committed Jan 30, 2024
1 parent 6f4f9fc commit ae40467
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
});

0 comments on commit ae40467

Please sign in to comment.