goatslacker / alt

Isomorphic flux implementation
http://alt.js.org/
3.45k stars 323 forks source link

Unable to import 'alt' using webpack (succesful with 'alt/lib') #593

Closed DisruptiveMind closed 8 years ago

DisruptiveMind commented 8 years ago

When importing Alt (0.18.1) using just the module name:

import Alt from 'alt';

webpack spits out

_alt2.default not a function

I managed to make it work by using the 'alt/lib' path instead:

import Alt from 'alt/lib';

Then everything works as expected. I must be missing something....

DisruptiveMind commented 8 years ago

It was a bad resolve setting in webpack, but I'm still unable to resolve alt/utils/connectToStore.

jdlehman commented 8 years ago

connectToStore has moved to another repo: https://github.com/altjs/utils

DisruptiveMind commented 8 years ago

@jdlehman thanks!

irakli-lekishvili commented 8 years ago

@DisruptiveMind I have same problem, when I'm removing resolve.root works fine, how did you fix?

DisruptiveMind commented 8 years ago

@lekishvili I had to use the updated package as @jdlehman mentioned above