mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 11:39:01 +01:00 
			
		
		
		
	chore(app/share): add workaround for dead code eliminination by webpack
since fetchNote function is not used anywhere, webpack will treat it as "dead code" and remove it from the final output I did not have any success with using webpack config flags like "sideEffects", so I've reverted to this workaround for now
This commit is contained in:
		
							parent
							
								
									3ed9528495
								
							
						
					
					
						commit
						74f6ad46ae
					
				| @ -25,3 +25,9 @@ document.addEventListener( | |||||||
|     }, |     }, | ||||||
|     false |     false | ||||||
| ); | ); | ||||||
|  | 
 | ||||||
|  | // workaround to prevent webpack from removing "fetchNote" as dead code:
 | ||||||
|  | // add fetchNote as property to the window object
 | ||||||
|  | Object.defineProperty(window, "fetchNote", { | ||||||
|  |     value: fetchNote | ||||||
|  | }); | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Panagiotis Papadopoulos
						Panagiotis Papadopoulos