mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	fix(utils/dynamicRequire): pass moduleName explicitly as string
fixes the Webpack warning: "WARNING in ./src/public/app/services/utils.ts 249:15-34 Critical dependency: the request of a dependency is an expression" as we now explicitly pass the moduleName as string and not "expression" source: https://stackoverflow.com/questions/42908116/
This commit is contained in:
		| @@ -308,7 +308,9 @@ function dynamicRequire(moduleName: string) { | ||||
|     if (typeof __non_webpack_require__ !== "undefined") { | ||||
|         return __non_webpack_require__(moduleName); | ||||
|     } 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}`); | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user