Skip to content

Commit 7016006

Browse files
committed
test NEXT_PUBLIC
1 parent 0935a26 commit 7016006

File tree

5 files changed

+4
-22
lines changed

5 files changed

+4
-22
lines changed
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export function isProduction() {
2-
return process.env.DESIGNSYSTEMET_ENV === 'production';
2+
return process.env.NEXT_PUBLIC_DESIGNSYSTEMET_ENV === 'production';
33
}

apps/theme/next.config.mjs

-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
import path from 'node:path';
2-
import dotenv from 'dotenv';
3-
4-
dotenv.config({
5-
path: path.resolve(process.cwd(), '.env.local'),
6-
});
7-
8-
console.log('env: ', process.env);
9-
101
/** @type {import('next').NextConfig} */
112
const nextConfig = {
123
eslint: {

apps/theme/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"@repo/components": "workspace:^",
1919
"chroma-js": "^3.1.2",
2020
"clsx": "^2.1.1",
21-
"dotenv": "^16.4.7",
2221
"next": "^15.1.5",
2322
"react": "^19.0.0",
2423
"react-color-palette": "^7.3.0",
@@ -31,4 +30,4 @@
3130
"@types/react": "^19.0.7",
3231
"@types/react-dom": "^19.0.3"
3332
}
34-
}
33+
}

apps/theme/utils/is-production.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export function isProduction() {
2-
return process.env.DESIGNSYSTEMET_ENV === 'production';
2+
return process.env.NEXT_PUBLIC_DESIGNSYSTEMET_ENV === 'production';
33
}
44

55
export function designsystemetEnv() {
6-
return process.env.DESIGNSYSTEMET_ENV;
6+
return process.env.NEXT_PUBLIC_DESIGNSYSTEMET_ENV;
77
}

yarn.lock

-8
Original file line numberDiff line numberDiff line change
@@ -6252,13 +6252,6 @@ __metadata:
62526252
languageName: node
62536253
linkType: hard
62546254

6255-
"dotenv@npm:^16.4.7":
6256-
version: 16.4.7
6257-
resolution: "dotenv@npm:16.4.7"
6258-
checksum: 10/f13bfe97db88f0df4ec505eeffb8925ec51f2d56a3d0b6d916964d8b4af494e6fb1633ba5d09089b552e77ab2a25de58d70259b2c5ed45ec148221835fc99a0c
6259-
languageName: node
6260-
linkType: hard
6261-
62626255
"dotenv@npm:^8.1.0":
62636256
version: 8.6.0
62646257
resolution: "dotenv@npm:8.6.0"
@@ -12929,7 +12922,6 @@ __metadata:
1292912922
"@types/react-dom": "npm:^19.0.3"
1293012923
chroma-js: "npm:^3.1.2"
1293112924
clsx: "npm:^2.1.1"
12932-
dotenv: "npm:^16.4.7"
1293312925
next: "npm:^15.1.5"
1293412926
react: "npm:^19.0.0"
1293512927
react-color-palette: "npm:^7.3.0"

0 commit comments

Comments
 (0)