Closed stkevintan closed 6 years ago
oh, I know in strict mode , this will be replaced by undefined. wtf....
oh, I know in strict mode , this will be replaced by undefined. wtf....
Right. And here we need something like
if(global === undefined && window !== undefined) global = window
Why was this closed?
Was there a resolution for this?
@johnlim I give up to pack lunr into my bundle resources. just use the old way: script html tag
@stkevintan Did you consider using webpack instead?
There was a PR in rollup but there were some issues with it so it was stalled. If someone were to pick it up again, this would be great.
when I import
lunr
and trigger thelunr.utils.warn
function , the 'warn' will be an error in browser environment. becauseglobal
is not defined.