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

Non-es-modules dependencies #322

Open
alxdnlnko opened this issue Sep 5, 2018 · 3 comments
Open

Non-es-modules dependencies #322

alxdnlnko opened this issue Sep 5, 2018 · 3 comments

Comments

@alxdnlnko
Copy link

Hello. I'm trying to use redux-actions in Polymer 3 project with module imports (without any browserify compilation), but redux-actions depends on some libraries, that doesn't provide module exports, for example: invariant and lodash.camelcase.

So i'm getting such errors:
Uncaught SyntaxError: The requested module '../../../lodash.camelcase/index.js' does not provide an export named 'default'

I tried to fork invariant and added the es-module there, and it worked ok. Lodash can be substituted with lodash-es.

But does redux-actions really have to depend on theese libraries? invariant and camelcase are not so big functions and can be simply included in redux-actions, this would make the redux-actions more independent.

@ghost
Copy link

ghost commented Sep 16, 2018

@alxdnlnko I'm in the same situation... what do you mean by 'fork invariant and added the es-module there'?
Thanks.

@alxdnlnko
Copy link
Author

@andreabioli, there are three ways of solving this problem:

  1. remove "bad" dependencies (fork redux-actions on github, make pull request and wait it to be merged and published)
  2. fix "bad" dependencies (fork all "bad" dependencies projects, fix them, make pull requests and wait them all to be merged and published)
  3. not using redux-actions until somebody do one of previous options :)

I choose the 3 way, because I have no time to wait. Just made myself some tiny util-functions (like createAction) in my project.

@ghost
Copy link

ghost commented Sep 16, 2018

@alxdnlnko Oh, this is really what I call 'pragmatism'! :-) I will follow the same, then... :-)
Thanks again!

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

1 participant