Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
beyondkmp committed Oct 5, 2024
1 parent fb79d91 commit 3c8f924
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/app-builder-lib/src/util/appFileCopier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ export async function computeNodeModuleFileSets(platformPackager: PlatformPackag
let index = 0
const NODE_MODULES = "node_modules"
const getRealSource = (name: string, source: string) => {
const scopeDepth = name.split("/").length
let parentDir = path.dirname(source)

const scopeDepth = name.split("/").length
// get the parent dir of the package, input: /root/path/node_modules/@electron/remote, output: /root/path/node_modules
for (let i = 0; i < scopeDepth - 1; i++) {
parentDir = path.dirname(source)
parentDir = path.dirname(parentDir)
}

// for the local node modules which is not in node modules
Expand Down

0 comments on commit 3c8f924

Please sign in to comment.