Taritsyn / JavaScriptEngineSwitcher

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines. This library allows you to quickly and easily switch to using of another JavaScript engine.
Apache License 2.0
439 stars 49 forks source link

ES 6 Support? #95

Closed LorenDorez closed 2 years ago

LorenDorez commented 2 years ago

Hello,

We are currently using this with ReactJS.net. We use Webpack to compile all our JSX and then send the compiled JS to the JS engine.

We would like to remove support to IE11 (ES5) and natively support ES6 without having to bring in the bloat of polyfills to downgrade to ES5.

Is this possible with maybe chakra or V8 engines?

Taritsyn commented 2 years ago

Hello, Loren!

Yes, this is possible with the ChakraCore and V8 modules.

If you use the V8 module, then you will have access to the most recent versions of ECMAScript.

LorenDorez commented 2 years ago

Awesome thanks going to work on getting this setup and tested

Taritsyn commented 2 years ago

It's worth noting that all of the above applies only to server-side rendering. Execution of client-side JS code will still depend on browsers.

LorenDorez commented 2 years ago

Yeah i have a small JS function i run for feature detection and then show a special message telling them their browser is unsupported. I just needed SSR to run as my special message is a compiled React component that i set 'display:none' on

Taritsyn commented 2 years ago

Then there should be no problems.