Skip to content

v5.0.0

Latest

Choose a tag to compare

@childrentime childrentime released this 08 Apr 06:28
· 6 commits to main since this release
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