diff options
author | Marcin Zelent <marcin@zelent.net> | 2021-01-08 19:47:37 +0100 |
---|---|---|
committer | Marcin Zelent <marcin@zelent.net> | 2021-01-08 19:47:37 +0100 |
commit | 628632ff5092f1e3cf6c968d9bdfbd9a24f59541 (patch) | |
tree | feddb4e82267bba700a15a6a7091f922f48cae40 /next.config.js |
Initial commit
Diffstat (limited to 'next.config.js')
-rw-r--r-- | next.config.js | 34 |
1 files changed, 34 insertions, 0 deletions
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; + }, + }, +); |