diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-12 19:38:40 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-12 19:38:40 +0100 |
| commit | 9e2451dc62a13811ea26b1354f2bf316bf62e60d (patch) | |
| tree | be5577f756f34c363a0e3922a9d26e0f2bbad7a4 /next.config.js | |
| parent | 77676783887a21d362ff1cf71ede10f713e128c6 (diff) | |
build: configure svgr to use svg as components
Diffstat (limited to 'next.config.js')
| -rw-r--r-- | next.config.js | 34 |
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; }, |
