search-index
search-index copied to clipboard
Browser: Uncaught SyntaxError: ambiguous indirect export: si
Hi @fergiemcdowall! I'm trying to import the ESM-version to run in the browser, but not sure what's exported from search-index-esm-4.0.0.js
?
In HTML:
<script type="module" src="./geo-search-app.mjs"></script>
In geo-search-app.mjs
import { si } from './search-index-esm-4.0.0.js'
const idx = await si()
Then I get an error-message, saying
Uncaught SyntaxError: ambiguous indirect export: si
That's why I'm wondering what search-index is exported as?
But the ESM-version is maybe only made for NodeJS and not the browser?
I think it should just be available as a global variable SearchIndex
:)
It is in search-index-4.0.0.js (UMD), but not the ESM - search-index-esm-4.0.0.js
Ah right yes. In the newest version, it is ESM compatible by default.
on npm as [email protected]
If that works, I can also start on a simple service worker for seach-index, importing the different things you need into the service worker. I'll test it later today.
You deprecated 5.0.0-rc1
?
I can't remember exactly why I did that, but I probably published it as the latest version by accident, and then depredated it in a panic just to make sure that nobody actually used it! (strictly speaking it should be published with tag: next
)
Is it possible with a 5.0.0-rc2
with the next
tag? So i can play around with the geo-search-helper demo =)