Skip to content

Migrate to Vite #314#315

Open
SharonStrats wants to merge 1 commit into
stagingfrom
feat/vite-migration
Open

Migrate to Vite #314#315
SharonStrats wants to merge 1 commit into
stagingfrom
feat/vite-migration

Conversation

@SharonStrats

@SharonStrats SharonStrats commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Migrate from Webpack/babel/jest to Vite

I have tested this in my local solidos setup with most branches pointing at the staging branch (only a couple pane repos were not, but they were created off of the staging branch).

When i ran this for the first time I had trouble with overrides again in solid-panes and actually this time in profile-pane this time as well. I had to remove the override for pane-registry and solid-logic in solid-panes and solid-logic in profile-pane.

@SharonStrats SharonStrats self-assigned this Jul 5, 2026
@SharonStrats SharonStrats added the enhancement New feature or request label Jul 5, 2026
@SharonStrats SharonStrats moved this to In review in SolidOS NLNet UI Jul 5, 2026
@SharonStrats SharonStrats linked an issue Jul 5, 2026 that may be closed by this pull request
@SharonStrats SharonStrats force-pushed the feat/vite-migration branch from fa301e2 to da8e62c Compare July 5, 2026 00:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the solid-logic build and test tooling from Webpack/Babel/Jest to Vite/Vitest, updating packaging metadata and refactoring tests to run under Vitest with a new fetch-mocking approach.

Changes:

  • Replace Webpack/Babel/Jest configuration with a Vite + Vitest setup (vite.config.mts) and update TypeScript resolution for bundlers.
  • Update package.json scripts/entrypoints/exports to align with the new build output model.
  • Refactor test suite from Jest APIs to Vitest APIs, introducing a custom fetch-mock implementation and updated test setup.

Reviewed changes

Copilot reviewed 23 out of 25 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
webpack.config.mjs Removed Webpack build configuration as part of the migration to Vite.
vite.config.mts Added Vite build config and Vitest configuration (jsdom + setup + coverage).
tsconfig.json Switched to moduleResolution: bundler to better match bundler behavior.
test/utils.test.ts Migrated test runner imports to Vitest.
test/utilityLogic.test.ts Migrated to Vitest and updated fetch mocking/typing within tests.
test/unit/setup.ts Added shared mock-web and request-capture helper used by test setup.
test/typeIndexLogic.test.ts Migrated Jest environment directives to Vitest imports.
test/testBundles/test-umd.html Removed legacy UMD bundle browser test file.
test/solidAuthLogic.test.ts Replaced Jest module mocking with an inline stub + Vitest imports.
test/profileLogic.test.ts Migrated Jest environment directives to Vitest imports.
test/mocks/solid-oidc-client-browser.ts Removed Jest-specific module mock implementation.
test/logic.test.ts Migrated to Vitest and updated fetch mocking usage.
test/inboxLogic.test.ts Migrated to Vitest; updated fetch mock matchers and typings.
test/helpers/setup.ts Updated global test setup for Vitest, including fetch/TextEncoder/TextDecoder setup.
test/helpers/fetch-mock.ts Added a custom fetch-mock implementation to replace jest-fetch-mock.
test/helpers/debugger.ts Migrated debug silencing from Jest spies to Vitest spies.
test/container.test.ts Migrated to Vitest and updated typings/mocking patterns.
test/chatLogic.test.ts Migrated to Vitest and updated time mocking and typings.
test/authUtil.test.ts Migrated to Vitest imports.
test/aclLogic.test.ts Migrated to Vitest imports and improved typing.
README.md Updated documentation to reflect Vite/Vitest usage and updated dependency guidance.
package.json Updated scripts, entrypoints/exports, and dependencies for Vite/Vitest-based workflow.
jest.config.mjs Removed Jest configuration as part of the migration.
babel.config.mjs Removed Babel configuration as part of the migration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/helpers/fetch-mock.ts
Comment thread test/utilityLogic.test.ts
Comment thread package.json
Comment on lines 65 to 70
"dependencies": {
"@uvdsl/solid-oidc-client-browser": "^0.2.3",
"solid-namespace": "^0.5.4"
"solid-namespace": "^0.5.4",
"vite": "^8.0.16",
"vitest": "^4.1.9"
},

@SharonStrats SharonStrats Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is how it was in the package i copied it from. @NoelDeMartin should i change this

Comment thread package.json
Prompt: help me change the fetch mock and tests from Jest to Vite

Co-authored-by: GPT-5.4 Mini <gpt-5.4-mini@openai.com>
@SharonStrats

SharonStrats commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Merge this after SolidOS/mashlib#448 to make sure that solidos works locally and possibly when deploying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Migrate to Vite

2 participants