Skip to content

Commit

Permalink
fix(utils/dynamicRequire): pass moduleName explicitly as string
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
pano9000 committed Jan 19, 2025
1 parent 9025516 commit 527be09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/public/app/services/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function dynamicRequire(moduleName: string) {
if (typeof __non_webpack_require__ !== "undefined") {
return __non_webpack_require__(moduleName);
} else {
return require(moduleName);
return require(`${moduleName}`);
}
}

Expand Down

0 comments on commit 527be09

Please sign in to comment.