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

Version 1.4 does not work with webpack #7

Open
misogl opened this issue Jun 15, 2016 · 5 comments
Open

Version 1.4 does not work with webpack #7

misogl opened this issue Jun 15, 2016 · 5 comments

Comments

@misogl
Copy link

misogl commented Jun 15, 2016

In version 1.4 you have removed the use of isomorphic-fetch. This however causes problem in webpack, as it now tries to build the app with both whatwg-fetch and node-fetch, which fails.

A possible workaround for this issue would be to configure webpack so it uses something like a null-loader for node-fetch, but I consider this more like a hack than a real solution.

@callmephilip
Copy link

Seeing the same issue when using with React Native's packager

@leebenson
Copy link

I'm playing catch-up here, but what was the point of removing isomorphic-fetch? I'm getting this same issue with a standard isomorphic webpack build

@pukapukan
Copy link

Any update on this?

@antitoxic
Copy link

Same here. Is the project dying out? @arunoda

@unfernandito
Copy link

The solution is comment these lines on node_modules/lokka-transport-http/dist/index.js

if (typeof fetch === 'function') {
// has a native fetch implementation
fetchUrl = fetch;
} /else if (isNode()) {
// for Node.js
fetchUrl = require('node-fetch');
fetchUrl.Promise = _promise2.default;
} else {
// for the browser
require('whatwg-fetch');
fetchUrl = fetch;
}
/

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

6 participants