mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			352 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			352 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const fs = require("fs");
 | |
| 
 | |
| const PACKAGE_JSON_PATH = './node_modules/pdfjs-dist/package.json';
 | |
| 
 | |
| const packageJson = JSON.parse(
 | |
|     fs.readFileSync(PACKAGE_JSON_PATH).toString()
 | |
| );
 | |
| 
 | |
| // non-legacy build doesn't work on node 16 at least
 | |
| packageJson.main = "legacy/build/pdf.js";
 | |
| 
 | |
| fs.writeFileSync(PACKAGE_JSON_PATH, JSON.stringify(packageJson, null, 2)); |