Closed selfawaresoup closed 10 years ago
So far, Lunr supports module.exports for node.js but not AMD style loading like with require.js.
module.exports
It also by default creates a global variable lunr even when loaded as a module.
lunr
Wrapping the lib in a function(){}, detecting the presence of defineor exports and only using a global variable as a fallback, this can be resolved.
function(){}
define
exports
So far, Lunr supports
module.exports
for node.js but not AMD style loading like with require.js.It also by default creates a global variable
lunr
even when loaded as a module.Wrapping the lib in a
function(){}
, detecting the presence ofdefine
orexports
and only using a global variable as a fallback, this can be resolved.