feat: migrate to Vite+ (Oxlint, Oxfmt, vp run)#156
Closed
chrisjwalk-bot wants to merge 18 commits into
Closed
Conversation
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>
|
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>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-156.eastus2.2.azurestaticapps.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #155
What
Phase 1 of migrating off Nx tooling to Vite+ (vite-plus).
Changes
Linting: ESLint → Oxlint
eslint.config.cjsfiles (root + all libs).oxlintrc.jsonviavp migrateeslint,eslint-config-prettier,@nx/eslint,@nx/eslint-pluginfrom devDeps.lintstagedrc.cjsto usevp lint/vp fmtvp lintFormatting: Prettier → Oxfmt
vite.config.tsfmtblock viavp fmt --migrate.prettierrcand.prettierignoreprettierfrom devDepsvp fmtTest runner: Nx → vp run
package.jsonwith"test": "vitest run"to all 7 libspackage.jsonwithbuild+testscripts toapps/web-app@nx/vitest:testtargets from all libproject.jsonfilesvp run -r test(runs all 8 packages in parallel)Config changes
vite.config.mts→vite.base.config.mts(shared lib base config)vite.config.ts(Vite+ workspace config)nxViteTsPaths()plugin with Vite 8 nativeresolve.tsconfigPaths: truevite-plus ^0.1.20to devDependenciesWhat stays on Nx (for now)
apps/api(dotnet) — not a Vite projectweb-appbuild/serve — complex Analog config, migrated incrementallynxcommands, to be updated in a follow-up