-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
30 lines (23 loc) · 978 Bytes
/
Copy pathnext.config.js
File metadata and controls
30 lines (23 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* @type {import('next').NextConfig}
*/
const isProd = process.env.NODE_ENV === 'production'
const { version } = require('./package.json')
const nextConfig = {
// Disable export for development, enable for production builds
output: process.env.NODE_ENV === 'production' ? 'export' : undefined,
// Set the base path and asset prefix for GitHub Pages deployment
basePath: isProd ? '/binaural-beat-player' : undefined,
assetPrefix: isProd ? '/binaural-beat-player/' : undefined, // assetPrefix requires a trailing slash
// Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html`
// trailingSlash: true,
// Optional: Prevent automatic `/me` -> `/me/`, instead preserve `href`
// skipTrailingSlashRedirect: true,
// Optional: Change the output directory `out` -> `dist`
// distDir: 'dist',
// Expose package.json version as environment variable
env: {
CUSTOM_VERSION: version,
},
}
module.exports = nextConfig