'How to support ES6 syntax in Nodejs 12?

I'm using the current version 12.0 of NodeJS but i am having trouble with ES6 syntax. Node doesn't understanding the syntax of ES6 like optional chaining, export & import but i need to use it in my project.

In short, how can I use ES6 syntax in NodeJS v12.0 without using TypeScript compiler? Any babel support it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source