Created
May 15, 2022 23:25
-
-
Save jesulink2514/fb0e0d4edb92959d30012f810b9fcf6e to your computer and use it in GitHub Desktop.
next.config.js for static export
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
/** @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