Check for require: “function is used in a way in which dependencies cannot be statically extracted”

I’m submitting a bug report

Webpack version:
1.13.1

Please tell us about your environment:
OS X 10.11.6

Current behavior:
.//codebird/codebird.js
Critical dependencies:
1238:15-22 require function is used in a way in which dependencies cannot be statically extracted
@ ./
/codebird/codebird.js 1238:15-22

https://github.com/jublonet/codebird-js/blob/develop/codebird.js#L555

} else if (typeof require === "function" && require) {

Expected/desired behavior:
No error should be seen.

  • What is the motivation / use case for changing the behavior?
    Checking if require is available should not cause this error.

Author: Fantashit

1 thought on “Check for require: “function is used in a way in which dependencies cannot be statically extracted”

  1. } else if (typeof require === "function" && require) {

    rewrite it to

    } else if (typeof require === "function") {

Comments are closed.