Runtime environment info #43
-
Can you please give some info about the supported runtime environments? Is Node required? Can the library be used in a browser (if so, what ES version do browsers need to support)? Can polyfills be used in order to use this library on old browsers (e.g. IE11)? Which polyfills would be required (I see things like Object.getOwnPropertySymbols being used)? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This library isn't zero-dependency, hence node is needed to load dependencies and thus it cannot be used in browsers out of the box. Out of the box, the library uses ES2018. That being said, the library uses no node specific apis and thus can be used in browsers fairly easily. You'll just need to use a build tool (such as webpack or rollup) to bundle the library for browsers. These bundlers (with the use of plugins such as babel) will be able to handle down leveling JavaScript and adding any needed polyfills. |
Beta Was this translation helpful? Give feedback.
-
Alternatively, you can use a CDN like skypack.dev to provide a web-ready version of the library. |
Beta Was this translation helpful? Give feedback.
This library isn't zero-dependency, hence node is needed to load dependencies and thus it cannot be used in browsers out of the box. Out of the box, the library uses ES2018.
That being said, the library uses no node specific apis and thus can be used in browsers fairly easily. You'll just need to use a build tool (such as webpack or rollup) to bundle the library for browsers. These bundlers (with the use of plugins such as babel) will be able to handle down leveling JavaScript and adding any needed polyfills.