From 628632ff5092f1e3cf6c968d9bdfbd9a24f59541 Mon Sep 17 00:00:00 2001 From: Marcin Zelent Date: Fri, 8 Jan 2021 19:47:37 +0100 Subject: Initial commit --- next.config.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 next.config.js (limited to 'next.config.js') diff --git a/next.config.js b/next.config.js new file mode 100644 index 0000000..edadc14 --- /dev/null +++ b/next.config.js @@ -0,0 +1,34 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const withPlugins = require('next-compose-plugins'); +const optimizedImages = require('next-optimized-images'); +// eslint-disable-next-line import/no-extraneous-dependencies +const sharp = require('responsive-loader/sharp'); + +module.exports = withPlugins( + [ + [ + optimizedImages, + { + defaultImageLoader: 'responsive-loader', + handleImages: ['jpeg', 'png', 'svg', 'webp', 'gif'], + optimizeImages: true, + optimizeImagesInDev: true, + responsive: { + adapter: sharp, + quality: 75, + size: 1920, + }, + }, + ], + ], + { + webpack: (config) => { + config.module.rules.push({ + test: /\.gpx/, + use: 'raw-loader', + }); + + return config; + }, + }, +); -- cgit v1.2.3