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

Closed
arolson101 opened this issue Feb 16, 2017 · 4 comments
Closed

Comments

@arolson101
Copy link

I'm using webpack 2 and getting these 2 warnings:

WARNING in ../~/jsondiffpatch/src/main.js
56:20-50 Critical dependency: the request of a dependency is an expression

WARNING in ../~/jsondiffpatch/src/main.js
61:19-47 Critical dependency: the request of a dependency is an expression

the lines in question are:

  var packageInfoModuleName = '../package.json';
  var packageInfo = require(packageInfoModuleName);

and

  var formatterModuleName = './formatters';
  var formatters = require(formatterModuleName);

Would it be possible to inline the strings and call require('../package.json') instead?

@EvanDarwin
Copy link

👍

@flyinghail
Copy link

flyinghail commented Mar 21, 2017

You can try this config for webpack: #76 (comment)

@cooperka
Copy link

cooperka commented Dec 10, 2017

Feel free to use this workaround in your package.json until #164 is merged:

"jsondiffpatch": "cooperka/jsondiffpatch#ba25ec9e7fb1684dfb0b5a8be3b1763bd9ab9348"

@benjamine
Copy link
Owner

this has been fixed recently (started using rollbar and prebuilt /dist bundles)

jleft pushed a commit to jleft/prosemirror-dev-tools that referenced this issue Jul 11, 2018
benjamine/jsondiffpatch#172 was fixed from `[email protected]`; the workaround for webpack warning
is no longer required.
jleft pushed a commit to jleft/prosemirror-dev-tools that referenced this issue Jul 11, 2018
benjamine/jsondiffpatch#172 was fixed from `[email protected]`; the workaround for the webpack
warnings is no longer required.
jleft pushed a commit to jleft/prosemirror-dev-tools that referenced this issue Jul 11, 2018
benjamine/jsondiffpatch#172 was fixed from `[email protected]`; the workaround for the webpack
warnings is no longer required.
d4rkr00t pushed a commit to d4rkr00t/prosemirror-dev-tools that referenced this issue Jul 12, 2018
benjamine/jsondiffpatch#172 was fixed from `[email protected]`; the workaround for the webpack
warnings is no longer required.
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

5 participants