kimmobrunfeldt / kimmobrunfeldt/progressbar.js

Requesting ECMAScript module (ESM) bundle support

Open
#270 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.9k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

Progressbar.js is providing the following warning in the Angular CLI for the new v10 release:

Screen Shot 2020-06-29 at 12 36 23 PM

Starting with Angular 10 the Angular CLI now provide warnings for CommonJS modules. Read more about it here:
https://blog.angular.io/version-10-of-angular-now-available-78960babd41

> When you use a dependency that is packaged with CommonJS, it can result in larger slower applications.
> Starting with version 10, we now warn you when your build pulls in one of these bundles. If you’ve started seeing these warnings for your dependencies, let your dependency know that you’d prefer an ECMAScript module (ESM) bundle.

And here:
https://angular.io/guide/build#configuring-commonjs-dependencies

> It is recommended that you avoid depending on CommonJS modules in your Angular applications. Depending on CommonJS modules can prevent bundlers and minifiers from optimizing your application, which results in larger bundle sizes. Instead, it is recommended that you use ECMAScript modules in your entire application. For more information, see How CommonJS is making your bundles larger

They reference the following article regarding the issues with CommonJS:
https://web.dev/commonjs-larger-bundles/

Additionally I've seen a few discussions by Angular staff members on Github discussing potentially dropping CommonJS support by default, and making it an opt-in feature in the future.

I realize the Angular team is taking a very strong armed approach here, but their reasoning seems solid. Needless to say I'd love to see ESM support if possible. Thanks!

Contributor guide

Open the contributing guide

Research direction

Start by reviewing Progressbar.js's current package and bundle configuration, then reproduce the Angular CLI warning described in the issue. Done means the package provides an ECMAScript module bundle that Angular CLI can consume without the CommonJS warning.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.