How to use require() ?

General discussion and chat (archived)
pulp3894y

How to use require() ?

Unread post by pulp3894y » 2017-11-11, 09:27

Anybody knows what this is and how to use it?

pulp3894y

Re: How to use require() ?

Unread post by pulp3894y » 2017-11-14, 14:10

Not a very popular subforum, this is.

This looks revelant: https://blog.mozilla.org/addons/2013/01 ... re-syntax/

Example of usage: require('./lib/main')

I need to understand if it creates a new scope, and if it does, how to access everything in it from the browser console.

Locked