EternallyCurious
EternallyCurious

Reputation: 2415

How can you make function calls from app.js to another file without using module.exports?

I want to make function calls from app.js to another js file in the same project without using modeule.export. Is there a way to do so? Possibly by including the file in package.json?

I'm not able to find a way to include other js files in package.json "scripts" list. Maybe that would allow function calls to be made across files.

Upvotes: 0

Views: 104

Answers (1)

maček
maček

Reputation: 77826

Nope

Sorry to let you down, but you have to use module.exports

Upvotes: 1

Related Questions