fix: absolute inject file path support
This commit is contained in:
2
bin/helpers/merge.ts
vendored
2
bin/helpers/merge.ts
vendored
@@ -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.');
|
logger.error('The injected file must be in either CSS or JS format.');
|
||||||
return;
|
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;
|
tauriConf.pake.inject = files;
|
||||||
await combineFiles(files, path.join(npmDirectory, `src-tauri/src/inject/_INJECT_.js`));
|
await combineFiles(files, path.join(npmDirectory, `src-tauri/src/inject/_INJECT_.js`));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,5 @@
|
|||||||
"shortDescription": "",
|
"shortDescription": "",
|
||||||
"targets": ["dmg"]
|
"targets": ["dmg"]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user