mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	Merge pull request #1012 from TriliumNext/fix_webpack-warning
fix(utils/dynamicRequire): get rid of Webpack Critical dependency warning
This commit is contained in:
		
						commit
						b913e4e090
					
				@ -308,7 +308,9 @@ function dynamicRequire(moduleName: string) {
 | 
				
			|||||||
    if (typeof __non_webpack_require__ !== "undefined") {
 | 
					    if (typeof __non_webpack_require__ !== "undefined") {
 | 
				
			||||||
        return __non_webpack_require__(moduleName);
 | 
					        return __non_webpack_require__(moduleName);
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        return require(moduleName);
 | 
					        // explicitly pass as string and not as expression to suppress webpack warning
 | 
				
			||||||
 | 
					        // 'Critical dependency: the request of a dependency is an expression'
 | 
				
			||||||
 | 
					        return require(`${moduleName}`);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user