VADOSWARE · Nov 23, 2022
PSA: Getting __dirname and Package Information with ES Modules
0Sign in to vote or save
This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.
tl;dr - __dirname and package information are a bit harder to get from an ES module. In case you’re not using them yet, take a second to read up on Javascript (“ES” – EMCAScript) modules – they’re quite the large feature/platform change, big steps up (mostly) from CommonJS and RequireJS (AMD). One of the things that isn’t quite as nice as RequireJS in…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.