-
-
Notifications
You must be signed in to change notification settings - Fork 808
Open
Description
I've noticed that, currently, it makes little to no difference to use import {deflate} from 'pako' rather than import pako from 'pako'.
import pako from 'pako'
kroki.js → kroki.bundled.js...
Build summary for kroki.bundled.js - es
┌──────────────────┬───────────┐
│ File name │ Size │
│ ---------------- │ --------- │
│ kroki.bundled.js │ 247.11 kB │
│ ---------------- │ --------- │
│ Totals │ 247.11 kB │
└──────────────────┴───────────┘
created kroki.bundled.js in 851ms
import {deflate} from 'pako'
kroki.js → kroki.bundled.js...
Build summary for kroki.bundled.js - es
┌──────────────────┬───────────┐
│ File name │ Size │
│ ---------------- │ --------- │
│ kroki.bundled.js │ 244.26 kB │
│ ---------------- │ --------- │
│ Totals │ 244.26 kB │
└──────────────────┴───────────┘
created kroki.bundled.js in 854ms
While investigating, I saw that Inflate was not removed from the bundle but if I convert function Inflate(options) to a class class Inflate then it's working as expected:
kroki.js → kroki.bundled.js...
Build summary for kroki.bundled.js - es
┌──────────────────┬───────────┐
│ File name │ Size │
│ ---------------- │ --------- │
│ kroki.bundled.js │ 156.18 kB │
│ ---------------- │ --------- │
│ Totals │ 156.18 kB │
└──────────────────┴───────────┘
created kroki.bundled.js in 662ms
Is there a particular reason for not using classes? Will you consider a pull request with that change?
FireMasterK, HansBrende, Tanmayshetty and alexrififi
Metadata
Metadata
Assignees
Labels
No labels