Thursday 31 March 2016

ES6 Import x Require

Hi guys! Trying the new js with express, I got a doubt about the require().In express, I use:app.use('/path' , require('dependecy'));I know, I could import before and then pass the imported dependency, but is there any way to do this with import in a single line?How about the require? Will require be deprecated?

Submitted April 01, 2016 at 12:40AM by ianakiara

No comments:

Post a Comment