olivernn / lunr.js

A bit like Solr, but much smaller and not as bright
http://lunrjs.com
MIT License
8.96k stars 548 forks source link

Adding lunr.js v0.5.11 breaks Angular application #168

Closed tobilg closed 9 years ago

tobilg commented 9 years ago

I'm trying to add the lunr.js v0.5.11 to my angular project. I see the behavior that when I add the lunr.js file before any Angular (module) file, Angular is crashing with a nomod error.

If I remove lunr.js again, everything works as expected.

olivernn commented 9 years ago

Do you have a reduced test case to help me (or the angular devs) reproduce the issue?

I'm not familiar with angular so I don't know what a nomod error is. If you provide me with some more detail I might be able to help though.

tobilg commented 9 years ago

Sorry, this was because I referenced the library like

<script src="javascripts/vendor/lunr/lunr.js"/>

instead of

<script src="javascripts/vendor/lunr/lunr.js"></script>

in the latest Chrome. If I use the latter, it works flawlessly.