@@ -149,7 +149,7 @@ const config: ForgeConfig = {
149
149
150
150
// Copy the package
151
151
console . log ( `Copying ${ dep } ...` ) ;
152
- cpSync ( rootDepPath , localDepPath , { recursive : true } ) ;
152
+ cpSync ( rootDepPath , localDepPath , { recursive : true , dereference : true , force : true } ) ;
153
153
console . log ( `✓ Successfully copied ${ dep } ` ) ;
154
154
} catch ( error ) {
155
155
console . error ( `Failed to copy ${ dep } :` , error ) ;
@@ -169,7 +169,7 @@ const config: ForgeConfig = {
169
169
170
170
// Read where the symlink points to
171
171
const symlinkTarget = readlinkSync ( localDepPath ) ;
172
- const absoluteTarget = join ( localNodeModules , dep , ".." , symlinkTarget ) ;
172
+ const absoluteTarget = join ( localDepPath , ".." , symlinkTarget ) ;
173
173
const sourcePath = normalize ( absoluteTarget ) ;
174
174
175
175
console . log ( ` Symlink points to: ${ sourcePath } ` ) ;
@@ -314,6 +314,7 @@ const config: ForgeConfig = {
314
314
icon : "./assets/logo" , // Path to your icon file
315
315
appBundleId : "com.amical.desktop" , // Proper bundle ID
316
316
extraResource : [
317
+ `${ process . platform === "win32" ? "../../packages/native-helpers/windows-helper/bin" : "../../packages/native-helpers/swift-helper/bin" } ` ,
317
318
"./src/db/migrations" ,
318
319
// Only include the platform-specific node binary
319
320
`./node-binaries/${ process . platform } -${ process . arch } /node${
@@ -398,11 +399,13 @@ const config: ForgeConfig = {
398
399
}
399
400
400
401
// Handle scoped packages: if dep is @scope /package, also keep @scope/ directory
402
+ // But not for our workspace packages
401
403
if ( dep . includes ( "/" ) && dep . startsWith ( "@" ) ) {
402
404
const scopeDir = dep . split ( "/" ) [ 0 ] ; // @libsql /client -> @libsql
403
405
// for workspace packages only keep the actual package
404
406
if ( scopeDir === "@amical" ) {
405
- if ( filePath . startsWith ( `/node_modules/${ dep } /` ) ) {
407
+ if ( filePath . startsWith ( `/node_modules/${ dep } ` ) ||
408
+ filePath === `/node_modules/${ scopeDir } ` ) {
406
409
KEEP_FILE . keep = true ;
407
410
KEEP_FILE . log = true ;
408
411
}
0 commit comments