I want to use includes() and padding methods in my enonic project. bit as I found my enonic js version is not ES6. SO I cannot use those methods in my project. Is there any way to update JS version in enonic project
Hey cherysan19;
You can transpile code down to es5 (Usually done with babel and webpack). Our current engine supports es5. Then you can write es6 code and when building the output will be es5 code.
We are working on integrating a new engine that supports es6. I don’t know how soon this will be available.
1 Like
Hi @cherysan19
We are using the Webpack Starter for all our projects.
Here is an example there on how to polyfill functions you need serverside:
– Tom Arild
1 Like