Skip to content

Commit c2457c6

Browse files
committed
Add missing env inlining for standalone mode
1 parent 7e41c12 commit c2457c6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/next/src/lib/inline-static-env.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ export async function inlineStaticEnv({
2323
const serverChunks = await glob('**/*.{js,json,js.map}', {
2424
cwd: serverDir,
2525
})
26+
const standaloneServerDir = path.join(
27+
distDir,
28+
'standalone',
29+
'.next',
30+
'server'
31+
)
32+
const standaloneServerChunks = await glob('**/*.{js,json,js.map}', {
33+
cwd: standaloneServerDir,
34+
})
2635
const clientDir = path.join(distDir, 'static')
2736
const clientChunks = await glob('**/*.{js,json,js.map}', {
2837
cwd: clientDir,
@@ -48,6 +57,7 @@ export async function inlineStaticEnv({
4857
for (const [parentDir, files] of [
4958
[serverDir, serverChunks],
5059
[clientDir, clientChunks],
60+
[standaloneServerDir, standaloneServerChunks],
5161
] as const) {
5262
await Promise.all(
5363
files.map(async (file) => {

0 commit comments

Comments
 (0)