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 #99

Closed
jmikrut opened this issue Nov 24, 2020 · 3 comments
Closed

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

jmikrut opened this issue Nov 24, 2020 · 3 comments
Labels

Comments

@jmikrut
Copy link

jmikrut commented Nov 24, 2020

Hi there, thanks for the package!

I am using it to obfuscate a React component we're writing with default options. The component is built with Webpack 5 and Typescript as libraryTarget: 'commonjs2' and it builds properly, however, when I go to use the component in any other React project, I receive the following error:

Critical dependency: the request of a dependency is an expression

WARNING in ./node_modules/package-name/dist/bundle.js 1:22488-22503
Critical dependency: the request of a dependency is an expression

I've narrowed down the problem to this plugin, specifically.

I appreciate any insight!

Edit: could have to do with this issue?

javascript-obfuscator/obfuscator-loader#1

@sanex3339
Copy link
Member

You can use ignoreRequireImports: false option

@mspinelli
Copy link

You can use ignoreRequireImports: false option

This doesn't appear to be part of v2.6 (I'm using webpack 4). Can this be back ported to v2?

@sanex3339
Copy link
Member

sanex3339 commented May 8, 2021

ignoreRequireImports is javascript-obfuscator option. So you have to install latest version of javascript-obfuscator as a peer dependency for webpack-obfuscator

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

No branches or pull requests

3 participants