Skip to content

tweak tsconfig to make lib smaller#4

Open
mad-gooze wants to merge 1 commit into
lkster:masterfrom
mad-gooze:optimize-bundle-size
Open

tweak tsconfig to make lib smaller#4
mad-gooze wants to merge 1 commit into
lkster:masterfrom
mad-gooze:optimize-bundle-size

Conversation

@mad-gooze

Copy link
Copy Markdown

Hi! Thanks for a nice lib!

This tsconfig settings decrease Safetify bundle (from 25kb to 16kb minified) without breaking compability.

Comment thread tsconfig.json
@@ -1,12 +1,13 @@
{
"compilerOptions": {
"importHelpers": true,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

importHelpers makes typescript require __extends helper from tslib instead of inlining it to every class declaration

Comment thread tsconfig.json
"es2015.promise"
],
"module": "commonjs",
"module": "ESNext",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

esnext module output enables webpack module concatenation which remove a lot of webpack boilerplate code

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.

1 participant