Skip to content

Conversation

gaterking
Copy link
Contributor

ref: change browser workspace building. Use typescript code in another packages instead of using dist/*.js. It can reduce the bundle size by use tslib be shared.
In original building, there are many same code such as __assign, __generator builded by different package.
#1552 (comment)

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

…r packages instead of js in dist. It can reduce the bundle size by use tslib be shared.
@kamilogorek
Copy link
Contributor

@gaterking thank you! It works like a charm. I tested it locally and calculated the diff:

no-compression:
bundle.js 312.1kB => 263.5kB (-48.6kB, -16%)
bundle.min.js 91.5kB => 66.3kB (-25.2kB, **-28%**)

gzip:
bundle.js 60.5kB => 54.6kB (-5.9kB, -10%)
bundle.min.js 24.1kB => 21.4kB (-2.7kB, **-11%**)

Can you remove one outstanding comment from tsconfig?

@kamilogorek kamilogorek merged commit a3738b7 into getsentry:master Nov 15, 2018
@kamilogorek
Copy link
Contributor

Thanks! :)

@vkrol vkrol mentioned this pull request Nov 18, 2018
8 tasks
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