Tagged: requirejs


Dynamic module loading with require

Let’s say we have ./darwin.js for mac, ./win32.js for Windows in the current working directory. And we want to require one of them in ./index.js based on which platform the file is being ran....


exports is not defined

This is very common error when your project has ES6 modules as well as require.js module systems. Here, I will show you few examples on how to require ES6 modules inside an AMD module....