askorama / orama

🌌 Fast, dependency-free, full-text and vector search engine with typo tolerance, filters, facets, stemming, and more. Works with any JavaScript runtime, browser, server, service!

Home Page:https://docs.askorama.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate `orama_db.json` in the `dist/client` folder on Astro

okikio opened this issue · comments

Describe the bug

The Orama Astro Plugin generates the orama_db.json file in the root dist folder, when ideally it should be generating it in the dist/client folder

To Reproduce

  1. Install Astro & the Astro Orama Plugin
  2. Use try to fetch the db using getOramaDB("...") using the Astro plugin
  3. Error on client saying the orama_db.json doesn't exist

Expected behavior

The expected behaviour is that the orama_db.json file should be placed in this path dist/client/assets/orama_db.json

Environment Info

OS: Ubuntu 22.04
Node: 21
@orama/plugin-astro: 2.0.7

Affected areas

Environment/OS

Additional context

It's an incredibly simple fix, we just need to use dir instead of config.outDir. I'll draft a pr for fixing this

PR #639