8000 Critical dependency warning when bundling with Webpack 5 · Issue #25 · sindresorhus/import-fresh · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Critical dependency warning when bundling with Webpack 5 #25
Open
@Poolshark

Description

@Poolshark

I've ran into an issue when trying to run a React application with Webpack 5. I receive the warning

WARNING in ../../../.yarn/cache/import-fresh-npm-3.3.0-3e34265ca9-2cacfad06e.zip/node_modules/import-fresh/index.js 32:31-48

Critical dependency: the request of a dependency is an expression

According to here this is caused by something like:

let var1 = someCall();
require(var1); // webpack can't determine var1 value

Here is the location in your source code which could be the problem.

https://github.com/sindresorhus/import-fresh/blob/main/index.js#L32 report there. ( not sure that this should work with webpack )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0