aboutsummaryrefslogtreecommitdiffstats
path: root/next.config.js
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-12 19:38:40 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-12 19:38:40 +0100
commit9e2451dc62a13811ea26b1354f2bf316bf62e60d (patch)
treebe5577f756f34c363a0e3922a9d26e0f2bbad7a4 /next.config.js
parent77676783887a21d362ff1cf71ede10f713e128c6 (diff)
build: configure svgr to use svg as components
Diffstat (limited to 'next.config.js')
-rw-r--r--next.config.js34
1 files changed, 30 insertions, 4 deletions
diff --git a/next.config.js b/next.config.js
index f7b37d6..9c2debe 100644
--- a/next.config.js
+++ b/next.config.js
@@ -8,10 +8,36 @@ module.exports = {
},
reactStrictMode: true,
webpack: (config) => {
- config.module.rules.push({
- test: /\.po/,
- use: ['@lingui/loader'],
- });
+ config.module.rules.push(
+ {
+ test: /\.po/,
+ use: ['@lingui/loader'],
+ },
+ {
+ test: /\.svg$/,
+ use: [
+ {
+ loader: '@svgr/webpack',
+ options: {
+ svgoConfig: {
+ plugins: [
+ {
+ name: 'preset-default',
+ params: {
+ overrides: {
+ removeTitle: false,
+ removeViewBox: false,
+ },
+ },
+ },
+ 'removeDimensions',
+ ],
+ },
+ },
+ },
+ ],
+ }
+ );
return config;
},