Skip to content

Conversation

@samouri
Copy link
Member

@samouri samouri commented Jun 18, 2021

summary
Separates out type-only imports from regular imports.
Helps ensure side effects don't get needlessly added.

- dist/worker/worker.mjs: 11.88 kb --> 11.79 kb
- dist/worker/worker.js: 13.51 kb --> 13.42 kb
- dist/amp-production/worker/worker.mjs: 12.81 kb --> 12.68 kb
- dist/amp-production/worker/worker.js:  14.39 kb --> 14.29 kb

cc @kristoferbaxter

@samouri samouri requested review from erwinmombay and rcebulko June 18, 2021 15:26
Copy link
Collaborator

@rcebulko rcebulko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a solid step forward! I'm curious, how many of these type imports are importing classes as type signatures versus typedefs, aliases, interfaces, etc that don't have a specific class implementation behind them?

@samouri samouri self-assigned this Jun 18, 2021
@samouri samouri merged commit b1f1658 into main Jun 18, 2021
@samouri samouri deleted the import-type branch June 18, 2021 17:07
samouri added a commit that referenced this pull request Jul 2, 2021
samouri added a commit that referenced this pull request Jul 2, 2021
* Revert "worker: fix faulty import type (#1072)"

This reverts commit 35139ef.

* Revert "Separate out all type-only imports (#1067)"

This reverts commit b1f1658.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants