Skip to content

Commit

Permalink
fix: absolute inject file path support
Browse files Browse the repository at this point in the history
  • Loading branch information
jeasonnow committed Jul 4, 2023
1 parent 96edb6f commit 7bec1a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/helpers/merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export async function mergeConfig(url: string, options: PakeAppOptions, tauriCon
logger.error('The injected file must be in either CSS or JS format.');
return;
}
const files = inject.map(relativePath => path.join(process.cwd(), relativePath));
const files = inject.map(filepath => path.isAbsolute(filepath) ? filepath : path.join(process.cwd(), filepath));
tauriConf.pake.inject = files;
await combineFiles(files, path.join(npmDirectory, `src-tauri/src/inject/_INJECT_.js`));
}
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/tauri.macos.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
"shortDescription": "",
"targets": ["dmg"]
}
}
}
}

0 comments on commit 7bec1a6

Please sign in to comment.