Closed akanass closed 3 years ago
@MasterKale this PR makes a better ES5
version so we have to use it anyway.
If you want to have ES5
as default you can use all of this else I have just to rollback package.json
and README
and ES2018
will still be the default version but the new ES5
has to be used because it's an optimised one.
As discussed with @Moumouls in #114 we agreed that ES5
has to be the default one to support build
and rendering
in client
and server
side without any trick like this more people will be able to use it in old and modern browsers.
@MasterKale the requested changes have been made. You'll have to decide how to bump the version because we don't have the same default version anymore so I think 2.3.0
would be the minimum
I just tested this out in Next.JS and Create-React-App in IE10 and IE11 and everything seems fine. Thank you for another speedy build improvement! 😃
@MasterKale It was my pleasure again to help on it and glad you're happy with this 😄
This PR updates @simplewebauthn/browser's build and bundling pipeline to generate artifacts to support a wider range of use cases. This includes:
A new
"main"
build that targets ES5 A new"main:es2018"
build that targets ES2018 A UMD bundle that targets ES2018 A UMD bundle that targets ES5 for deprecated browsersES5
version has been optimised to have a better weight at the end and compatible withbrowser
andnode
build systems.The documentation has been updated as well to explain
ES5
is now the default version and how to useES2018
in build systems.This should address Issue #114 and especially for framework with
SSR
compatibility.You can see the result of the new build with
Next.js
here