new
new copied to clipboard
TODO: different level of browser support
Maybe not now, but before alpha release.
Add options for user to select the level of browser support. The list of options is to be decided.
Default to evergreen browsers. One good thing is it does not need to transpile async/await on latest browsers. Transpiled async/await is a performance killer. The lowest we can go is IE11. It will require few polyfills and use special Aurelia 2 build.
Current scaffolding is updated to use ES2017 by default, which has native async/await support.
Any update on this? :D I created a site using the npx makes aurelia
skeleton (using typescript + webpack) and it does not load in IE11. tsconfig.json targets ES2017 but changing that to es5 does not help since the deps aren't transpiled to es5. I get this error:
SCRIPT1002: Syntax error
entry-bundle.js (130,27)
The code that it can't handle is an arrow function imported from the @aurelia package (row 130 is the middle row with the arrow function):
function enableImprovedExpressionDebugging() {
astTypeMap.forEach(x => { adoptDebugMethods(x.type, x.name); });
}
There is nothing we can do in this repo, because currently Aurelia 2 npm packages dist files are not compiled to support IE11.
@fkleuver has plan to provide IE11 compatible dist files. But it's not a high priority now.
If your production app needs to support IE11, I am afraid Aurelia 2 is not the best choice, at least for now.
It's not only transpiling to es5, but also many polyfills for IE11. Especially Aurelia 2 uses reflect metadata APIs which is very new in JS standard.
There is nothing we can do in this repo, because currently Aurelia 2 npm packages dist files are not compiled to support IE11.
Correct, this is a problem to be solved in the aurelia repo. However, once we support IE11 we'll probably distribute those files separately because they would be limiting factors for performance and certain features (e.g. proxies). Will there be a facility to conditionally target one set of dist files vs. the other @3cp ?
conditionally target one set of dist files
That's bundler's responsibility. Yes, all bundlers have some kind of custom config to support that.