folktale icon indicating copy to clipboard operation
folktale copied to clipboard

Support for esm

Open Sceat opened this issue 5 years ago • 3 comments

import Task from 'folktale/concurrency/task/index.js'
const { task } = Task
// succeed
import { task } from 'folktale/concurrency/task/index.js'
// fails

Do you plan to support type modules ? Thanks.

Sceat avatar May 18 '20 17:05 Sceat

It was planned for the next version, but between me moving to another country and not working with JavaScript anymore, finding time to maintain this library has been difficult :(

robotlolita avatar May 18 '20 19:05 robotlolita

Hey @robotlolita, I can probably start working on a PR that rewrites all require()/module.exports as import/export and attempts to get CommonJS and ESM builds in the CI. I'll probably need some help after that though.

Any particular branch I should target for said PR?

opiation avatar Feb 24 '21 04:02 opiation

@opiation you can base it off the master branch, and PR towards the master branch.

robotlolita avatar Feb 25 '21 21:02 robotlolita