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

webpack throwing a warning in 4.0.0 #981

Closed
mjhm opened this issue May 30, 2017 · 2 comments · Fixed by #986
Closed

webpack throwing a warning in 4.0.0 #981

mjhm opened this issue May 30, 2017 · 2 comments · Fixed by #986
Labels

Comments

@mjhm
Copy link

mjhm commented May 30, 2017

I'm seeing the following warning with Chai 4.0.0 that I didn't have with Chai 3.5.0

WARNING in ./~/chai/chai.js
Critical dependencies:
1:477-484 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
 @ ./~/chai/chai.js 1:477-484

The use case is browser based testing from within the "storybook-addon-specifications" module.

I suspect that the problem is the new browser field in the "package.json" file. Webpack is now trying to load the "chai.js" webpacked file instead of original source "index.js". Perhaps a solution is to add a "webpack": "index.js" line to package.json.

I'm no webpack expert though. I would defer to someone wiser in the ways of Webpack than myself.

@lucasfcosta
Copy link
Member

Hi @mjhm, thanks for your issue!

Let's see if any of the other maintainers have any good ideas on how to handle this, but for now I think we should mitigate this problem by following your suggestion.

@meeber
Copy link
Contributor

meeber commented May 31, 2017

@mjhm Thanks for the issue. Gonna close this because I think it's the same root problem as #978. Will track resolution there.

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

Successfully merging a pull request may close this issue.

3 participants