livestorejs/livestore

Investigate and improve bundle size

Open

#298 opened on Apr 16, 2025

View on GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (128 forks)github user discovery
area:effecteffecthelp wantedoptimization

Repository metrics

Stars
 (3,599 stars)
PR merge metrics
 (PR metrics pending)

Description

We should investigate and improve the bundle size if possible:

From web-todomvc example with manual chunk splitting:

export default defineConfig({
  server: {
    port: process.env.PORT ? Number(process.env.PORT) : 60_001,
    fs: { strict: false },
  },
  build: {
    rollupOptions: {
      output: {
        manualChunks(id) {
          if (id.includes('@livestore')) {
            return 'livestore'
          }
        },
      },
    },
  },

Image

Given LiveStore currently bundles Effect, the bundle size should be already greatly reduced with Effect 4.

Contributor guide