Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
next.config.js for superprops
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