-
Notifications
You must be signed in to change notification settings - Fork 102
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
es6 Imports #146
Comments
There are indeed plans, but even though the latest v8 version supports it now, need to wait for (2) things: AWS Lambda to move to the latest version of node and the rest of the browsers to catch up. One of the things I do personally, is bring in ramda and crocks functions into a "helpers" file where I: export const State = require('crocks/State')
export const evolve = require('ramda/src/evolve')
...
// then I can
import { evolve, State } from '../utils/helpers' There are other benefits to this approach (while we wait for the world to catch up). The problem is, it puts people who are not transpiling in the awkward position to have to That said, I am open to suggestions to avoid the |
@gunins Okay. Was talking with someone today and I have a solution to make every one happy. |
That's will be great. New chrome and Nodejs support es6 modules nativelly. Thanks! |
Please consider appending the <script type="module">
import Async from '/node_modules/crocks/src/Async/index.js';
</script> date-fns follows this approach, see for example https://github.com/date-fns/date-fns/blob/master/src/esm/index.js |
This seems to have a resolution, feel free to open if there is any more to add here |
Hi
Thanks, for very useful library. Any plans to replace
require
to es6import
? es6import
will be more natural, and since latest versions of chrome and nodejs is supporting them, will work on client and server.The text was updated successfully, but these errors were encountered: