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

Request: better 'how to fix' in options.unknowncritical error msg #299

Closed
gregglind opened this issue Jun 5, 2014 · 4 comments
Closed

Comments

@gregglind
Copy link

Specific case: Trying to bundle bower-cortex fails. bower-cortex is a browserfied library, and when required gives me this message:

WARNING in ./bower_components/bower-cortex/build/cortex.min.js
Critical dependencies:
1:104-105 require function is used in a way, in which dependencies cannot be statically extracted
  1. What is the fix for this?
  2. Can the message give a better hint about what the problem is, like "That file is not CommonJS compliant" or "Look for the npm version" or whatever is implied by (1)?
@jhnns
Copy link
Member

jhnns commented Jun 5, 2014

It usually happens when using pre-build or minified modules. Use the CommonJS-version if possible. Also take a look at #205 #196

@sokra sokra closed this as completed in ff36642 Jun 5, 2014
@sokra
Copy link
Member

sokra commented Jun 5, 2014

You now get this message:

This seem to be a pre-built javascript file. Even while this is possible, it's not recommended. Try to require to orginal source to get better results.

@frank-weindel
Copy link

Is there a way to turn off this message? There are some cases where the pre-built file is the only practical way to go.

@sokra
Copy link
Member

sokra commented Dec 16, 2014

with the module.noParse option.

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

4 participants