Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
chore: adapt to changed NFT type
Browse files Browse the repository at this point in the history
  • Loading branch information
netlify-team-account-1 committed Oct 26, 2021
1 parent ce98cd0 commit ba8232f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/runtimes/node/bundlers/nft/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ const traceFilesAndTranspile = async function ({
}
},
})
const normalizedDependencyPaths = dependencyPaths.map((path) => (basePath ? resolve(basePath, path) : resolve(path)))
const normalizedDependencyPaths = [...dependencyPaths].map((path) =>
basePath ? resolve(basePath, path) : resolve(path),
)

// We look at the cache object to find any paths corresponding to ESM files.
const esmPaths = [...(cache.analysisCache?.entries() || [])].filter(([, { isESM }]) => isESM).map(([path]) => path)
Expand Down Expand Up @@ -150,7 +152,9 @@ const getSrcFiles: GetSrcFilesFunction = async function ({ basePath, config, mai
includedFilesBasePath,
)
const { fileList: dependencyPaths } = await nodeFileTrace([mainFile], { base: basePath, ignore: ignoreFunction })
const normalizedDependencyPaths = dependencyPaths.map((path) => (basePath ? resolve(basePath, path) : resolve(path)))
const normalizedDependencyPaths = [...dependencyPaths].map((path) =>
basePath ? resolve(basePath, path) : resolve(path),
)
const includedPaths = filterExcludedPaths([...normalizedDependencyPaths, ...includedFilePaths], excludedPaths)

return includedPaths
Expand Down

0 comments on commit ba8232f

Please sign in to comment.