rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

7.5.5 increased bundle size

Open BlackGlory opened this issue 3 years ago • 3 comments

Describe the bug

The "require" fields added by https://github.com/ReactiveX/rxjs/pull/6821 cause webpack to use the cjs version instead of the esm version. If all the "require" fields are removed, the bundle size will be reduced.

Expected behavior

webpack should use the esm version.

Reproduction code

No response

Reproduction URL

No response

Version

7.5.5

Environment

No response

Additional context

No response

BlackGlory avatar Mar 19 '22 12:03 BlackGlory

Adding import condition above require condition should fix it

SimenB avatar Apr 01 '22 07:04 SimenB

@SimenB can you clarify: is this something rxjs needs to change or is there a config change a project can do to mitigate this?

mokipedia avatar Jun 29 '22 19:06 mokipedia

my suggested solution would be here in rxjs

SimenB avatar Jul 11 '22 13:07 SimenB