-
Notifications
You must be signed in to change notification settings - Fork 3
/
next.config.mjs
37 lines (32 loc) · 1023 Bytes
/
next.config.mjs
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
31
32
33
34
35
36
37
/** @type {import('next').NextConfig} */
import p from "./package.json" assert { type: "json" }
const starknetkitNextVersion = Object.entries(p.dependencies)
.find((dep) => dep[0] === "starknetkit-next")[1]
.replace("^", "")
.replace("npm:", "")
.split("@")[1]
const starknetkitLatestVersion = Object.entries(p.dependencies)
.find((dep) => dep[0] === "starknetkit-latest")[1]
.replace("^", "")
.replace("npm:", "")
.split("@")[1]
const starknetReactVersion = Object.entries(p.dependencies)
.find((dep) => dep[0] === "@starknet-react/core")[1]
.replace("^", "")
.replace("npm:", "")
.split("@")[0]
const starknetReactNextVersion = Object.entries(p.dependencies)
.find((dep) => dep[0] === "starknet-react-core-next")[1]
.replace("^", "")
.replace("npm:", "")
.split("@")[2]
const nextConfig = {
productionBrowserSourceMaps: true,
env: {
starknetkitNextVersion,
starknetkitLatestVersion,
starknetReactVersion,
starknetReactNextVersion,
},
}
export default nextConfig