Skip to content

Exports using module.exports for node v8 support - #24

Open
cammanderson wants to merge 1 commit into
mhelvens:masterfrom
cammanderson:master
Open

Exports using module.exports for node v8 support#24
cammanderson wants to merge 1 commit into
mhelvens:masterfrom
cammanderson:master

Conversation

@cammanderson

Copy link
Copy Markdown

By using module.exports for the class, node v8 (Current Node LTS) is able to load the library without babel polyfills or other transpiler.

I ran the 'pp' task which passed, and this is the result. I have included the src using node v8 and it loads without any further runtime.

@mhelvens

Copy link
Copy Markdown
Owner

Sorry for the delay in responding.

First thought: Moving the source-code away from ES6 modules is like taking a step backward. Your motivation is to be able to load the library without requiring the polyfill? That's fair enough, but I don't see a real downside to having a build-step. Want you like to try to provide that build-step?

Second thought: For libraries I don't see the point of committing package-lock.json (or yarn.lock) to version control. It won't be used by a project that has the library as a dependency. (Or did that change?)

Third thought: Have you looked at the failing CI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants