By using require(./filename)
I can include and execute the code inside filename without any export defined inside filename itself.
What is the equivalent in ES6 using import
?
Thanks
By using require(./filename)
I can include and execute the code inside filename without any export defined inside filename itself.
What is the equivalent in ES6 using import
?
Thanks
The equivalent is simply:
MDN has an excellent list of the syntax variations:
(Emphasis mine)