Skip to content

Commit 42d342e

Browse files
authored
fix(gatsby): Support symlinks in static directories (#25894)
1 parent 3f04458 commit 42d342e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/gatsby/src/utils/get-static-dir.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ export const copyStaticDirs = (): void => {
2727
// filter out the static folders that don't exist
2828
.filter(themeStaticPath => fs.existsSync(themeStaticPath))
2929
// copy the files for each folder into the user's build
30-
.map(folder => fs.copySync(folder, nodePath.join(process.cwd(), `public`)))
30+
.map(folder =>
31+
fs.copySync(folder, nodePath.join(process.cwd(), `public`), {
32+
dereference: true,
33+
})
34+
)
3135

3236
const staticDir = nodePath.join(process.cwd(), `static`)
3337
if (!fs.existsSync(staticDir)) return undefined

0 commit comments

Comments
 (0)