/ next.config.js
next.config.js
 1  /**
 2   * @type {import('next').NextConfig}
 3   */
 4  const nextConfig = {
 5  	output: "export",
 6  
 7  	// Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html`
 8  	trailingSlash: true,
 9  
10  	// Optional: Prevent automatic `/me` -> `/me/`, instead preserve `href`
11  	skipTrailingSlashRedirect: true,
12  
13  	// Optional: Change the output directory `out` -> `build`
14  	distDir: "build",
15  
16  	async rewrites() {
17  		return [
18  			{
19  				source: "/",
20  				destination: "/home",
21  			},
22  			{
23  				source: "/admin",
24  				destination: "/admin/index.html",
25  			},
26  		];
27  	},
28  };
29  
30  module.exports = nextConfig;