Skip to content

feat: migrate to Vite+ (Oxlint, Oxfmt, vp run)#156

Closed
chrisjwalk-bot wants to merge 18 commits into
mainfrom
feat/migrate-to-vite-plus-155
Closed

feat: migrate to Vite+ (Oxlint, Oxfmt, vp run)#156
chrisjwalk-bot wants to merge 18 commits into
mainfrom
feat/migrate-to-vite-plus-155

Conversation

@chrisjwalk-bot

Copy link
Copy Markdown
Collaborator

Closes #155

What

Phase 1 of migrating off Nx tooling to Vite+ (vite-plus).

Changes

Linting: ESLint → Oxlint

  • Removed all eslint.config.cjs files (root + all libs)
  • Generated .oxlintrc.json via vp migrate
  • Removed eslint, eslint-config-prettier, @nx/eslint, @nx/eslint-plugin from devDeps
  • Updated .lintstagedrc.cjs to use vp lint / vp fmt
  • Run linting: vp lint

Formatting: Prettier → Oxfmt

  • Migrated Prettier config into vite.config.ts fmt block via vp fmt --migrate
  • Removed .prettierrc and .prettierignore
  • Removed prettier from devDeps
  • Run formatting: vp fmt

Test runner: Nx → vp run

  • Added package.json with "test": "vitest run" to all 7 libs
  • Added package.json with build + test scripts to apps/web-app
  • Removed @nx/vitest:test targets from all lib project.json files
  • Run tests: vp run -r test (runs all 8 packages in parallel)

Config changes

  • Renamed vite.config.mtsvite.base.config.mts (shared lib base config)
  • Created new root vite.config.ts (Vite+ workspace config)
  • Replaced nxViteTsPaths() plugin with Vite 8 native resolve.tsconfigPaths: true
  • Added vite-plus ^0.1.20 to devDependencies

What stays on Nx (for now)

  • apps/api (dotnet) — not a Vite project
  • web-app build/serve — complex Analog config, migrated incrementally
  • CI pipeline — still uses nx commands, to be updated in a follow-up

chrisjwalk-bot and others added 17 commits May 10, 2026 13:39
 phase 1)

- Add package.json to all 7 libs for Vite+ workspace ordering
- Replace vite-tsconfig-paths plugin with Vite 8 native resolve.tsconfigPaths
- Replace ESLint with Oxlint (.oxlintrc.json via vp migrate)
- Migrate Prettier config to vite.config.ts fmt block via vp fmt --migrate
- Remove all eslint.config.cjs files from root and all libs
- Remove lint targets from all project.json files
- Rename vite.config.mts -> vite.base.config.mts (shared base config)
- Create new root vite.config.ts for vite-plus workspace task config
- Add vite-plus ^0.1.20 to devDependencies
- Remove: eslint, prettier, eslint-config-prettier, vite-tsconfig-paths,
  @nx/eslint, @nx/eslint-plugin from devDependencies
- Update .lintstagedrc.cjs to use vp lint / vp fmt
- Fix .oxlintrc.json: remove invalid @nx, @angular-eslint, @/ plugin refs
- Apply vp fmt formatting to all files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add 'test: vitest run' script to all 7 lib package.json files
- Add name/scripts to apps/web-app/package.json (test + build)
- Remove Nx @nx/vitest:test targets from all lib project.json files
- Remove Nx test target from web-app project.json (replaced by package.json)
- Update root package.json: test:all/lint/format scripts use vp run
- Rename root build/test scripts to build:all/test:all to avoid vp/Nx conflicts
- Fix vite.base.config.mts: pass tsconfig.spec.json to Angular plugin
  (silences tsconfig.app.json warnings in libs during vp run)
- Run: 'vp run -r test' now runs all 8 packages' unit tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace nxViteTsPaths() with native resolve.tsconfigPaths in update-packages/vite.config.mts
- Remove @nx/vite from devDependencies
- Remove stale @nx/eslint:lint target from dotnet-builder/project.json
- Update CI: lint/test steps now use vp lint / vp run -r test (no more nx affected)
- Bump pnpm action version from 10 to 11 to match packageManager field

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add .oxlintrc.json overrides: disable no-explicit-any and no-non-null-assertion
  in spec files, and no-explicit-any in tools/builders (intentional casts)
- Add oxlint-disable comment in NextStepsRunner.tsx for intentional useEffect deps
- Fix erasing-op warning: 0 * 1000 → 0 in auth.store.spec.ts
- Fix no-empty-file: add export to update-packages test-setup.ts
- Add lint.options.typeAware: false to vite.config.ts (tsgolint incompatible
  with Angular baseUrl / moduleResolution:bundler tsconfig options)

vp check now exits clean: fmt pass, lint pass, 0 warnings, 0 errors

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add test.projects to vite.config.ts so vp test delegates to each
package's vite config (which has the Angular plugin properly set up).
Uses Vitest 4 projects API (test.workspace was removed in v4).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Switch from defineConfig(fn) to defineConfig({}) so vp fmt/check can
  read the fmt field without executing plugin code
- Wrap Angular/PWA plugins with lazyPlugins() so they only instantiate
  during build/dev, not when tooling loads the config
- Replace __dirname with import.meta.dirname throughout
- Remove define.import.meta.vitest (required function wrapper)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…currently

- pnpm start now runs both the .NET API and Angular dev server concurrently
  (matching the old nx serve web-app behaviour)
- Add pnpm dev (vp dev), pnpm build (vp build), pnpm check (vp check)
- Add pnpm serve:api for standalone API server
- Remove all stale nx-dependent scripts (affected:*, dep-graph, etc.)
- Add concurrently as devDependency

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace nxE2EPreset and @nx/devkit workspaceRoot with plain path.resolve
- Replace nx webServer commands with dotnet run + vp dev
- Update baseURL from 4200 to 5173 (Vite default port)
- Update pnpm e2e to call playwright directly (no nx)
- Remove @nx/playwright and @nx/devkit devDependencies

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove nx, @nx/angular, @nx/esbuild, @nx/js, @nx/node, @nx/vitest,
  @nx/web, @nx/workspace devDependencies
- Remove @trivago/prettier-plugin-sort-imports (replaced by Oxfmt importOrder)
- Delete nx.json, migrations.json, and all project.json files
- Remove .nx ignore entries from vite.config.ts fmt and .oxlintrc.json
- Remove nxConsole VSCode setting
- Remove .nx from pnpm clean script

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove ESLint packages (replaced by Oxlint)
- Remove ts-node, @swc-node/register, @swc/core, @swc/helpers (unused)
- Remove prismjs (replaced by shiki), dotenv (unused)
- Remove tools/update-packages/eslint.config.cjs (dead config)
- Replace nx migrate with pnpm up --latest in update-packages tool
- Remove MigrationTask.hasMigrations and migrations.json merging logic
- Remove __nx__ task grouping from buildMigrationQueue
- Update SKILL.md to reflect new update workflow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pnpm/action-setup@v4 reads the version from packageManager in
package.json automatically. Having both causes ERR_PNPM_BAD_PM_VERSION.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pnpm 11 requires explicit approval of packages that run build scripts.
Add onlyBuiltDependencies to silence ERR_PNPM_IGNORED_BUILDS in CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The migration commit added an allowBuilds block with placeholder string
values ('set this to true or false') instead of booleans, which caused
pnpm to exit with ERR_PNPM_IGNORED_BUILDS in CI.

onlyBuiltDependencies was already correct in pnpm-workspace.yaml (from
main) and is the right mechanism for pnpm 11. Removed allowBuilds and
reverted the redundant package.json onlyBuiltDependencies addition.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
onlyBuiltDependencies was removed in pnpm v11 and replaced by allowBuilds.
Set all required native build packages to true.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace 'pnpm nx affected' build with 'pnpm build:prod' (vp build).
Remove Pack step — no equivalent in vite+ migration.
Remove Nx base ref setup step.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add fileReplacements to root vite.config.ts so NX_TASK_TARGET_CONFIGURATION=preview
swaps environment.ts with environment.preview.ts (pointing to Azure backend).
Update preview.yml to use 'pnpm build:prod' with that env var instead of 'pnpm nx'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-156.eastus2.2.azurestaticapps.net

- README.md: remove Nx references, update tooling to Vite+, remove
  home.md sync note, fix pnpm version (11+), fix test command (test:all)
- content/home.md: replace README clone with app-focused landing page
  (feature links, notifications, PWA blurb, source link)
- home.ts: update hero title/subtitle to remove Nx references
- assets/home.md: delete stale auto-generated file (was synced from README)
- ngsw-config.json: remove /assets/home.md from service worker cache

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-156.eastus2.2.azurestaticapps.net

@chrisjwalk chrisjwalk closed this Jun 8, 2026
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.

feat: migrate off Nx to Vite+

2 participants