Skip to content

Instantly share code, notes, and snippets.

@jesulink2514
Created May 15, 2022 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesulink2514/fb0e0d4edb92959d30012f810b9fcf6e to your computer and use it in GitHub Desktop.
Save jesulink2514/fb0e0d4edb92959d30012f810b9fcf6e to your computer and use it in GitHub Desktop.
next.config.js for static export
/** @type {import('next').NextConfig} */
const rewrites = () => {
return [
{
source: "/api/:path*",
destination: "http://localhost:5204/api/:path*",
},
];
};
const nextConfig = {
reactStrictMode: true,
webpackDevMiddleware: config => {
config.watchOptions = {
poll: 1000,
aggregateTimeout: 300,
}
return config
},
images: {
loader: 'akamai',
path: '/',
},
rewrites,
}
module.exports = nextConfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment