mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +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
	 Elian Doran
						Elian Doran