Skip to content

feat(storybook-angular,astro-angular): add Vite 8 OXC config support#2121

Merged
brandonroberts merged 9 commits into
analogjs:alphafrom
benpsnyder:feat/oxc-compiler-plugin
Mar 17, 2026
Merged

feat(storybook-angular,astro-angular): add Vite 8 OXC config support#2121
brandonroberts merged 9 commits into
analogjs:alphafrom
benpsnyder:feat/oxc-compiler-plugin

Conversation

@benpsnyder

@benpsnyder benpsnyder commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds vite.rolldownVersion conditionals to the two packages that were still using hardcoded esbuild config keys, aligning them with the rest of the plugin chain which already handles OXC/esbuild switching.

Changes

packages/storybook-angular/src/lib/preset.ts

  • Renamed storybookEsbuildPlugin() to storybookTransformConfigPlugin()
  • Config key now uses [vite.rolldownVersion ? 'oxc' : 'esbuild'] so keepNames: true applies correctly under both esbuild and OXC/Rolldown

packages/astro-angular/src/index.ts

  • Config key in getViteConfiguration() now uses [vite.rolldownVersion ? 'oxc' : 'esbuild']
  • JSX dev mode uses the correct property per bundler: jsx: { development: true } for OXC vs jsxDev: true for esbuild
  • Imports vite directly to detect Rolldown at runtime

packages/astro-angular/package.json

  • Added vite to peerDependencies (^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0) since the package now imports from vite directly

packages/astro-angular/vite.config.ts

  • Removed the explicit esbuild: false override
  • Cleared setupFiles now that the package no longer needs the old test setup path

tsconfig.base.json

  • Added a workspace path alias for @analogjs/vite-plugin-angular/setup-vitest so the new exported setup entry resolves correctly in local development and tests

Tests

packages/storybook-angular/src/lib/preset.spec.ts — 4 new tests (25 total):

  • should include the transform config plugin
  • should use esbuild config key when rolldownVersion is not available
  • should use oxc config key when rolldownVersion is available
  • should only apply during build

packages/astro-angular/src/index.spec.ts — 3 tests moved to a matched .spec.ts file:

  • should return astro configurations
  • should use esbuild config key when rolldownVersion is not available
  • should use oxc config key when rolldownVersion is available

Validation

  • pnpm nx test storybook-angular
  • pnpm nx test astro-angular

Context

All existing vite.rolldownVersion conditionals in the core plugin chain already handled OXC/esbuild switching. storybook-angular and astro-angular were the remaining packages still using hardcoded esbuild config keys. This completes OXC config coverage across the remaining Analog integration surface while keeping compatibility with the current Vite 5-8 support range.

@netlify

netlify Bot commented Mar 15, 2026

Copy link
Copy Markdown

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit 87dbd2e
🔍 Latest deploy log https://app.netlify.com/projects/analog-blog/deploys/69b954a341a1ea000864ecb8
😎 Deploy Preview https://deploy-preview-2121--analog-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@brandonroberts brandonroberts merged commit 62987d3 into analogjs:alpha Mar 17, 2026
11 checks passed
@brandonroberts brandonroberts deleted the feat/oxc-compiler-plugin branch March 17, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants