Closed scosman closed 2 months ago
[!CAUTION]
Review failed
The pull request is closed.
The recent updates enhance the search index functionality within the application. Key changes include the restructuring of the search index output directory, conditional building of the index based on the environment, and the integration of a new Vite plugin to streamline the build process. These improvements ensure that the search index is efficiently managed, promoting better performance during development and production.
Files | Change Summary |
---|---|
src/lib/build_index.ts |
Altered search index output directory and added directory existence check before writing the index file. |
src/routes/(marketing)/search/api/+server.ts |
Modified GET function to build the search index only in development mode; added dynamic import logic. |
vite.config.ts |
Introduced a new plugin for building and caching the search index during the writeBundle phase of the build. |
sequenceDiagram
participant User
participant Server
participant SearchIndex
User->>Server: Request search index
alt Development Mode
Server->>SearchIndex: Build and cache index
SearchIndex-->>Server: Index built
else Production Mode
Server-->>User: 404 Not Found
end
🐇 In the garden, I hop and play,
With a search index brightening the day.
In dev, we build, in prod, we find,
A clever change of a brilliant kind!
Hops of joy, let's all cheer,
For a smoother search, we hold dear! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Enhancements