-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
29 lines (27 loc) · 926 Bytes
/
Copy pathnext.config.js
File metadata and controls
29 lines (27 loc) · 926 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
const path = require('node:path')
/** @type {import('next').NextConfig} */
const rawBasePath = process.env.NEXT_PUBLIC_BASE_PATH?.trim()
const normalizedBasePath = !rawBasePath || rawBasePath === '/'
? ''
: rawBasePath.startsWith('/')
? rawBasePath.replace(/\/$/, '')
: `/${rawBasePath.replace(/\/$/, '')}`
const basePath = rawBasePath === undefined ? '/telos-bridge-v3' : normalizedBasePath
const nextConfig = {
output: 'export',
outputFileTracingRoot: __dirname,
reactStrictMode: true,
poweredByHeader: false,
trailingSlash: true,
images: { unoptimized: true },
basePath,
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@react-native-async-storage/async-storage': path.resolve(__dirname, 'lib/shims/async-storage.js'),
'pino-pretty': path.resolve(__dirname, 'lib/shims/pino-pretty.js'),
}
return config
},
}
module.exports = nextConfig