With requirejs is it possible to check if a module is defined without attempting to load it?

I was just looking for this myself, the require global has a “defined” method on it which takes a module name and returns true or false.

// returns true
require.defined("my/awesome/defined/module");

// returns false
require.defined("not/yet/loaded");

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)