monaco-tm
monaco-tm copied to clipboard
Critical dependency: the request of a dependency is an expression
When using webpack for this project, I got the following warning:
WARNING in ./node_modules/vscode-textmate/release/main.js 23:15-27
Critical dependency: the request of a dependency is an expression
@ ./src/providers.ts
@ ./src/app.ts
@ multi ./src/app.ts
Looks like some dynamically linked modules can not be statically determined by webpack. I checked the vscode-textmate
code:
function $load(name, factory) {
var mod = {
exports: {}
};
var requireFunc = function (mod) {
if ($map[mod]) {
return $map[mod].exports;
}
return require(mod);
};
factory.call(this, requireFunc, mod, mod.exports);
$map[name] = mod;
}
Looks like the require(mod)
caused the problem.
Is it safe to just dismiss the warning or is there anything we need to do about it?