Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading from TSDX 0.10 to 0.12 increases size by 0.12MB #442

Closed
daraclare opened this issue Jan 23, 2020 · 4 comments
Closed

Upgrading from TSDX 0.10 to 0.12 increases size by 0.12MB #442

daraclare opened this issue Jan 23, 2020 · 4 comments
Labels
solution: intended behavior This is not a bug and is expected behavior topic: v0.10.x Issues related to broken builds in v0.10.x / @wessberg/rollup-plugin-ts

Comments

@daraclare
Copy link

daraclare commented Jan 23, 2020

Current Behavior

This may not be a bug, if not, I apologise, but maybe documentation around this would be useful.

After updating our package from version 0.10.x to version 0.12.x of TSDX, I noticed an increase of 0.12MB in our unpacked size in the NPM registry. I realise this maybe because of the addition of our components folder, I assume this enables importing of individual components. How would we use this to our benefit, and is there a flag to turn this off if we decide not to use it?

PACKAGE DETAILS @ TSDX v0.12.x
Screenshot 2020-01-22 at 14 08 16

PACKAGE DETAILS @ TSDX v0.10.x
Screenshot 2020-01-22 at 14 07 35

NOTE: we reverted the change to see if any other package had been bumped to a minor version which may have affected the change and the resulting package size was 0.01MB difference.

Expected behavior

Although I wasn't expected it, this may be expected behaviour. Is there anything we should do to mitigate or improve this.

Suggested solution(s)

Documentation on this might be useful, happy to help if I can.

Your environment

Software Version(s)
TSDX 0.12.3
TypeScript 3.7.3
Browser N/A
Yarn 1.19.1
Node v10.15.3
Operating System 10.15.2
@agilgur5
Copy link
Collaborator

agilgur5 commented Jan 23, 2020

I think you mixed up the headings for your images (first one says 1.93MB on 0.10 and second says 1.81MB on 0.12).

Per the changelog, 0.10 tried to use @wessberg/rollup-plugin-ts, which turned out to be buggy, and 0.11 rolled that back to use rollup-plugin-typescript2.
Can't tell exactly without seeing the actual files, but based on your description the difference is probably that all versions other than 0.10 produce type definitions (.d.ts) on a per file basis, whereas @wessberg/rollup-plugin-ts tries to bundle and treeshake them into one file (which tsc doesn't even do), but is unfortunately buggy.
See also #200 and #287 and related discussions about the two different plugins

@agilgur5
Copy link
Collaborator

@jaredpalmer think it would be good to deprecate the entire 0.10.x line due the bugs in it to avoid further confusion.

@jaredpalmer
Copy link
Owner

Agree

@jaredpalmer
Copy link
Owner

I have just deprecated all 0.10.x releases with the following message:

TypeScript compilation is broken in 0.10.x releases. Please upgrade TSDX >= 0.11.x

@agilgur5 agilgur5 added solution: intended behavior This is not a bug and is expected behavior topic: v0.10.x Issues related to broken builds in v0.10.x / @wessberg/rollup-plugin-ts labels Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: intended behavior This is not a bug and is expected behavior topic: v0.10.x Issues related to broken builds in v0.10.x / @wessberg/rollup-plugin-ts
Projects
None yet
Development

No branches or pull requests

3 participants