I used Lokijs in my application and i managed to import both lokijs and loki-cordova-fs-adapter, but on ionic server i got such messages:
[19:12:20] rollup: Treating ‘fs’ as external dependency
[19:12:24] rollup: No name was provided for external module ‘fs’ in options.globals – guessing ‘fs’
In browser:
main.dev.js:3 Uncaught ReferenceError: fs is not defined
I tried different solutions from rollup issues, but nothing helped:
I had the same problem and could not solve it.
As an “dirty” workaround, i commented out the “fs” require in the lokijs.js file as i anyway use the indexed adapter. That works perfect for now
[09:33:39] rollup: No name was provided for external module 'events' in options.globals – guessing 'events'
[09:33:39] rollup: No name was provided for external module 'stream' in options.globals – guessing 'stream'