new icon indicating copy to clipboard operation
new copied to clipboard

TODO: different level of browser support

Open 3cp opened this issue 5 years ago • 6 comments

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.

3cp avatar Sep 25 '19 23:09 3cp

Current scaffolding is updated to use ES2017 by default, which has native async/await support.

3cp avatar Sep 26 '19 03:09 3cp

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); });
}

mikeesouth avatar Jul 07 '20 11:07 mikeesouth

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.

3cp avatar Jul 07 '20 12:07 3cp

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.

3cp avatar Jul 07 '20 12:07 3cp

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 ?

fkleuver avatar Jul 13 '20 08:07 fkleuver

conditionally target one set of dist files

That's bundler's responsibility. Yes, all bundlers have some kind of custom config to support that.

3cp avatar Jul 13 '20 11:07 3cp