opentype.js
opentype.js copied to clipboard
Switch from Reify to SWC for ensuring compatability with older browsers.
Description
Created a utility that runs esbuild and SWC to build the library. This supports a compat profile that works as far back as safari 8, maybe earlier.
This closes #619
Motivation and Context
The library is limited in compatibility by the number of new features we are using, this PR allows us to keep using those features while dropping reify and also supporting even older browsers.
How Has This Been Tested?
I tested the compat outputs using Browser Stack on multiple old browsers including safari 8 and some ancient versions of chrome. I also tested the other builds using more modern browsers.
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] I did
npm run test
and all tests passed green (including code styling checks). - [ ] I have added tests to cover my changes.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the README accordingly.
- [x] I have read the CONTRIBUTING document.