It would be nice to be able to use elasticlunr as an ES6 import which are now supported by most major browsers. This allows better code organisation and keeps the global name space cleaner. A minimal example that almost works:
I feel like it might be best to wrap the code that adds the global alias in a function so that users can invoke it if they need it, and otherwise not try to muck around with the global?
It would be nice to be able to use elasticlunr as an ES6 import which are now supported by most major browsers. This allows better code organisation and keeps the global name space cleaner. A minimal example that almost works:
But results in the error:
And fails to actually work and adding a var to line 90 then results in this error: