mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +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") { | ||||
|         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(); | ||||
|     } else { | ||||
|         throw new Error(`Unknown migration type '${mig.type}'`); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran