Skip to content

Releases: childrentime/pareto

Release list

v5.0.0

Choose a tag to compare

@childrentime childrentime released this 08 Apr 06:28
3e60033

Breaking Changes

configureVite config option removed

The framework-specific configureVite(config, { isServer }) hook has been removed. Users now customize Vite via a standard vite.config.ts in their project root, which Pareto loads and merges natively in both dev and build modes.

This aligns Pareto with the Vite ecosystem convention (TanStack Start, Vike, etc.) where frameworks do not expose custom config hooks.

Migration: Move your configureVite logic into a vite.config.ts at the project root.

Before (pareto.config.ts):

export default {
  configureVite(config, { isServer }) {
    config.plugins.push(tsconfigPaths())
    if (isServer) {
      config.ssr = { ...config.ssr, external: ['heavy-lib'] }
    }
    return config
  },
}

After (vite.config.ts):

import { defineConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
  plugins: [tsconfigPaths()],
  ssr: {
    external: ['heavy-lib'],
  },
})

For client/server-specific config, use Vite's native isSsrBuild flag:

export default defineConfig(({ isSsrBuild }) => ({
  plugins: [!isSsrBuild && clientOnlyPlugin()].filter(Boolean),
}))

vite moved to peerDependencies

Users must install vite in their project (any version ^6.0.0 || ^7.0.0) to write vite.config.ts. Most projects already have it transitively.

Bug Fixes

  • configureVite was never called in dev mode (#13) — Root cause fixed by removing the hook entirely and routing customization through standard Vite config, which works identically in dev and build.
  • Dev server SSR now respects ssr config — The dev server now includes ssr.noExternal: [/^@paretojs\//] matching build mode, so ssrLoadModule behaves consistently between dev and build.
  • Dev server now sets envPrefix: 'PARETO_' — Previously only on the build config, causing dev/build env var divergence. Now consistent across both.
  • Fixed flaky streaming SSR e2e test — Use waitUntil: 'commit' for streaming pages.

Tests

  • Added e2e tests verifying vite.config.ts is applied in dev (both examples)
  • Added e2e tests for environment variable isolation — verifies that unprefixed server-only vars stay on the server and only PARETO_* vars reach the client

Published packages

  • @paretojs/core@5.0.0
  • create-pareto@5.0.0

Full Changelog: https://github.com/childrentime/pareto/blob/main/CHANGELOG.md

v4.0.0

Choose a tag to compare

@childrentime childrentime released this 01 Apr 04:02

Pareto 4.0.0

Highlights

  • NDJSON streaming navigation — Client navigations now receive loader data via NDJSON streams, enabling progressive delivery with Suspense during navigation
  • head.tsx component convention — Per-route head management via React components with automatic merge and deduplication
  • document.tsx convention — Customize <html> attributes per-request (lang, dir, className)
  • 9x faster data loading than Next.jsBenchmark results show Pareto handles 2,733 req/s vs Next.js 293/s for data-loading pages
  • 6.5x higher streaming throughput — Sustains 2,022 req/s under load vs Next.js 310/s
  • 62 KB client JS (gzipped) — 1/4 of Next.js (233 KB)

Performance (CI benchmarks, Node 22, 4 CPUs)

Scenario Pareto Next.js React Router TanStack Start
Data Loading 2,733/s 293/s 955/s 1,386/s
Streaming SSR 247/s 236/s 247/s 247/s
API / JSON 3,675/s 2,212/s 1,950/s
Static SSR 2,224/s 3,328/s 997/s 2,009/s

Breaking Changes

  • HeadDescriptor / HeadFunction replaced by head.tsx components
  • hydrateApp() removed — use startClient()
  • RouterProvider no longer exported
  • createStoreApi() removed — use defineStore() from @paretojs/core/store
  • dehydrate() / getHydrationData() / hydrateStores() removed — hydration is automatic
  • Barrel files removed — import directly from source modules

New

  • startProductionServer() from @paretojs/core/node
  • SECURITY_HEADERS constant exported
  • Default error fallback component
  • Client-side head management during navigation
  • Route pattern caching for faster client navigation
  • wkWebViewFlushHint config option for iOS WKWebView

Full changelog: https://github.com/childrentime/pareto/blob/main/CHANGELOG.md

npm: @paretojs/core@4.0.0 · create-pareto@4.0.0