Skip to content

Commit

Permalink
fix(gatsby): Support symlinks in static directories (#25894)
Browse files Browse the repository at this point in the history
  • Loading branch information
jabrks committed Jul 21, 2020
1 parent 3f04458 commit 42d342e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/gatsby/src/utils/get-static-dir.ts
Expand Up @@ -27,7 +27,11 @@ export const copyStaticDirs = (): void => {
// filter out the static folders that don't exist
.filter(themeStaticPath => fs.existsSync(themeStaticPath))
// copy the files for each folder into the user's build
.map(folder => fs.copySync(folder, nodePath.join(process.cwd(), `public`)))
.map(folder =>
fs.copySync(folder, nodePath.join(process.cwd(), `public`), {
dereference: true,
})
)

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

0 comments on commit 42d342e

Please sign in to comment.