question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suggestion: consistent config or use browserslist for build config

See original GitHub issue

Currently the default build config is inconsistent:

  • TypeScript transpilation is set on es5 (so for IE),
  • but polyfills are set for evergreen (so not for IE),
  • and now auto-prefixer is set on IE9+ with default browserslist file in v6.

The default configuration should at least be consistent for those 3 aspects of compatibility.

I know that the TS target was stuck on es5 because of one special case (about tests I guess), I don’t know if it’s still a problem (@filipesilva ?).

But the CLI could do even better: now that there is an explicit default browserslist file, maybe it could use it to adapt the configuration of TS and polyfills automatically.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
clydincommented, Apr 25, 2018

At this point in the release cycle, defaulting to ES2015 would need to be a change that could be considered for 7.0. And there are definite merits to making that change.

As to the polyfills/browserslist sync, there is now a PR for this: https://github.com/angular/devkit/pull/774

1reaction
cyrilletuzicommented, Apr 16, 2018

Thanks for reopening the issue.

About ES2015, if it’s recommended to distribute librairies in ES2015, it’s a fortiori recommended for apps too. Otherwise, if all apps always retarget to ES5, then having the library distributed in ES2015 was not necessary in the first place.

Of course, which configuration should be enabled by default (evergreen or old browsers) would be a huge debate, with a lot of pros and cons on each side.

But a major point is: I think there is an important and good reason polyfills are configured for evergreen only by default: it’s because activating all the polyfills has a huge size/performance impact. It is certainly why that choice was done in the first place. And, correct me if I’m wrong, but I don’t think you’ll change your mind about this (and it’s good for me).

Then, as users who wants IE support have to take action for polyfills, it would be better if the other aspects (ES target and auto-prefixer) were consistent and configured for evergreen by default too.

That way, only people needing IE support would have to take action, instead of currently everyone has to take action to match their needs (of course, you can build for evergreen without taking action with the current options, but then you’re not in an optimized configuration, which is one of the main goals of the CLI).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Speed up with Browserslist
By default, if there is no config in the project, Browserslist will use default browsers. This query is an alias for > 0.5%,...
Read more >
Browserslist is a Good Idea
Browserslist is about a single configuration for all tools that need to know what browsers you support. We just looked at two major...
Read more >
email images not displaying - Page 3
Is anyone else all of a sudden not seeing graphics in CC sent emails? ... We've googled and looked at security settings and...
Read more >
5 Tips to Improve Ionic Angular App Performance
Reduce app build times by adding a Browserslist file ... A Browserslist file specifies the browsers that an app supports. Developer tools can...
Read more >
browserslist - npm
Browserslist will take queries from tool option, browserslist config, .browserslistrc config, browserslist section in package.json or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found