mathiasbynens / mathiasbynens/he

Let's set up a modern Rollup-based build system

Open
#76 5 comments 5 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.6k
Forks
264
PR merge metrics
No merged PRs in 30d

Description

Related to #64, we should remove all UMD and iife-related code and leave it for **Rollup** to produce UMD, CJS and EMS builds. Along the way, we could rebase the source to be in ES6+ and keep the source in ES Modules format so that importing parties could benefit from tree-shaking etc. Publishing methods as separate packages (lodash-style) is also an option which would solve #64.

Currently, the _iife_ wrapper in the source contains `this` and it throws errors in Rollup:

rollup

That's what I'm talking about — if we cleaned the source to be in ES Modules (with `import`/`export`) and left up to Rollup to produce the UMD build, we could improve the user experience.

The fork https://www.npmjs.com/package/lean-he already went to the right direction, removing the iife wrapper but it still lacks proper Rollup setup with UMD, CJS and ESM builds.

@mathiasbynens please advise, do you see value in this path or should we forget about setting up the Rollup and close this issue.

Contributor guide

No contributing guide indexed for this repository

Research direction

Begin by reviewing the repository’s current IIFE/UMD source handling and the Rollup errors described in the issue; compare the lean-he fork’s approach. A complete contribution would establish Rollup outputs for UMD, CJS, and ESM, remove the existing wrappers, and leave the source in ES module form.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.