ignore packages only on production build

Hi,

I'm trying to use Lucia Auth in my SvelteKit application.

I want to use better-sqlite3 for local developement and d1 for live deployment.

Is there any way to do that?

I figured the local part, but when I try to deploy to cf pages, it fails because of the better-sqlite3 dependancey.

Is there any way to only install better-sqlite3 in local and ignore it's installation while building for production?
I mean, better-sqlite3 uses fs which is not available on cf.
Was this page helpful?