so I have the following :
const config = require('./config'); I can't find out how to translate this into ecmascript 6.
I am converting an existing JS codebase to es6 and wish take advantage of the latest enhancements of J syntax.
Any suggestions ?
import config from './config.js'
Link to Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
const). The use ofimportdoesn't mean that you can benefit from 'enhancements', due to how native ES modules are implemented in Node.