mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
fix(migration): ESM imports not working on Windows
This commit is contained in:
parent
f04e747786
commit
b4310b5275
@ -106,7 +106,7 @@ async function executeMigration(mig: MigrationInfo) {
|
|||||||
} else if (mig.type === "js" || mig.type === "ts") {
|
} else if (mig.type === "js" || mig.type === "ts") {
|
||||||
console.log("Migration with JS module");
|
console.log("Migration with JS module");
|
||||||
|
|
||||||
const migrationModule = await import(`${resourceDir.MIGRATIONS_DIR}/${mig.file}`);
|
const migrationModule = await import(`file://${resourceDir.MIGRATIONS_DIR}/${mig.file}`);
|
||||||
await migrationModule.default();
|
await migrationModule.default();
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Unknown migration type '${mig.type}'`);
|
throw new Error(`Unknown migration type '${mig.type}'`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user