Created
February 17, 2020 14:44
-
-
Save sandys/4462f11342aa08d7bc441e9b84b4516c to your computer and use it in GitHub Desktop.
next.config.js for superprops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const withPlugins = require('next-compose-plugins'); | |
const withTM = require('next-transpile-modules')(['reusecore', 'common']); | |
const withOptimizedImages = require('next-optimized-images'); | |
const withFonts = require('next-fonts'); | |
const withCSS = require('@zeit/next-css'); | |
const path = require("path"); | |
module.exports = withPlugins( | |
[ | |
[withTM], | |
[ | |
withOptimizedImages, | |
{ | |
mozjpeg: { | |
quality: 90, | |
}, | |
webp: { | |
preset: 'default', | |
quality: 90, | |
}, | |
}, | |
], | |
withFonts, | |
withCSS, | |
], | |
{ | |
distDir: "../../dist/functions/next", | |
webpack(config) { | |
config.resolve.alias = { | |
...config.resolve.alias, | |
'common': path.join(__dirname, 'common'), | |
} | |
return config; | |
} | |
}, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment