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

set typescript target to ES6 #1261

Merged
merged 1 commit into from
Mar 24, 2018
Merged

set typescript target to ES6 #1261

merged 1 commit into from
Mar 24, 2018

Conversation

Conduitry
Copy link
Member

Two issues here - one is that the target option actually belongs inside compilerOptions in tsconfig.json, and so TypeScript was actually using its default target of ES3, not ES5. And then also there's not really a reason to target ES5 as far as I can tell anyway. This shaves 9% off the bundle size.

@Conduitry
Copy link
Member Author

Conduitry commented Mar 19, 2018

I've also removed the es5, es6, and dom from the lib compiler option. I'm ... not entirely clear on what these do. But Svelte builds and the tests pass locally for me without them. I feel less strongly about this second change, and would understand if you were hesitant to include it. Nevermind, I think I know vaguely what that is now, and it's not something we want to change. Removed that commit. What I'm not sure of, though, is why this reduces test coverage...

@codecov-io
Copy link

codecov-io commented Mar 19, 2018

Codecov Report

Merging #1261 into master will decrease coverage by 0.43%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1261      +/-   ##
==========================================
- Coverage   91.88%   91.45%   -0.44%     
==========================================
  Files         126      119       -7     
  Lines        4548     4283     -265     
  Branches     1478     1348     -130     
==========================================
- Hits         4179     3917     -262     
+ Misses        153      152       -1     
+ Partials      216      214       -2
Impacted Files Coverage Δ
src/utils/list.ts 50% <0%> (-16.67%) ⬇️
src/generators/nodes/Title.ts 54.05% <0%> (-6.42%) ⬇️
src/generators/nodes/MustacheTag.ts 87.5% <0%> (-4.17%) ⬇️
src/generators/server-side-rendering/index.ts 93.84% <0%> (-1.93%) ⬇️
src/css/Selector.ts 91.15% <0%> (-1.56%) ⬇️
src/generators/nodes/Text.ts 93.75% <0%> (-1.49%) ⬇️
src/css/Stylesheet.ts 90.1% <0%> (-1.26%) ⬇️
src/utils/annotateWithScopes.ts 84.78% <0%> (-1.22%) ⬇️
src/generators/nodes/Attribute.ts 84.74% <0%> (-1.05%) ⬇️
src/utils/CodeBuilder.ts 85.33% <0%> (-0.88%) ⬇️
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc416a5...60a7341. Read the comment docs.

@Rich-Harris Rich-Harris merged commit d29de3c into master Mar 24, 2018
@Rich-Harris Rich-Harris deleted the ts-target-es6 branch March 24, 2018 16:24
@Rich-Harris
Copy link
Member

SHUT UP CODECOV, YOU'RE NOT MY MUM

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