mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-21 21:25:11 +00:00
fix(nitro): skip copying symlinks and directories (#1510)
This commit is contained in:
parent
eb67eb919e
commit
aba2d224d0
@ -86,6 +86,10 @@ export function externals (opts: NodeExternalsOptions): Plugin {
|
||||
}
|
||||
|
||||
const writeFile = async (file) => {
|
||||
// Skip symlinks that are included in fileList
|
||||
if (await fse.stat(file).then(i => i.isDirectory())) {
|
||||
return
|
||||
}
|
||||
const src = resolve(opts.traceOptions.base, file)
|
||||
const dst = resolve(opts.outDir, 'node_modules', file.split('node_modules/').pop())
|
||||
await fse.mkdirp(dirname(dst))
|
||||
|
Loading…
Reference in New Issue
Block a user