Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical dependency: the request of a dependency is an expression #19

Open
ZsgsDesign opened this issue Aug 21, 2021 · 0 comments
Open

Comments

@ZsgsDesign
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant