#192 Vite Migration#199
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the source-pane package from a Webpack/Jest-based toolchain to a Vite/Vitest setup, aligning local development, build output, and test execution with the newer SolidOS tooling workflow.
Changes:
- Removed legacy Webpack/Babel/Jest configuration and dev-server assets.
- Added Vite + Vitest configuration (including coverage) and a minimal
src/index.jsentrypoint. - Updated package metadata/scripts/output paths from
lib/todist/, plus added contributor notes in the README.
Reviewed changes
Copilot reviewed 17 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.module.rules.mjs | Removed Webpack module rules as part of the Vite migration. |
| webpack.dev.config.mjs | Removed Webpack dev-server config (replaced by vite). |
| webpack.config.mjs | Removed Webpack production build configs (replaced by Vite build). |
| vite.config.mts | Added Vite/Vitest configuration via solidos-toolkit helpers. |
| tsconfig.json | Added TS config to support bundler-style module resolution (JS-first). |
| test/sourcePane.test.js | Migrated tests from Jest-style CommonJS to Vitest + ESM (with custom DOM helpers). |
| test/helpers/setup.js | Replaced Jest fetch mocking with a Vitest-based webOperation mock for rdflib fetcher usage. |
| test/helpers/jest.setup.js | Removed Jest-specific global setup. |
| test/mocks/styleMock.js | Removed Jest CSS mock file (no longer used). |
| src/index.js | Added a package entry module that re-exports sourcePane. |
| README.md | Added contribution section and updated dev/build/test commands. |
| package.json | Updated scripts and package entry/exports for Vite-based build output in dist/. |
| jest.config.mjs | Removed Jest configuration. |
| dev/index.js | Removed legacy dev-server entry script. |
| dev/index.html | Removed legacy dev-server HTML entry. |
| dev/dev-global.css | Removed legacy dev-only global styles. |
| dev/context.js | Removed legacy dev context wiring for Webpack setup. |
| babel.config.mjs | Removed Babel config used by Jest/Webpack pipeline. |
| .gitignore | Updated ignored build output directory from lib to dist. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "dependencies": { | ||
| "patch-package": "^8.0.1" | ||
| "vite": "^8.0.16", | ||
| "vitest": "^4.0.18", | ||
| "vitest-axe": "^0.1.0" | ||
| }, |
There was a problem hiding this comment.
this is how it was in contacts-pane @NoelDeMartin should i change this?
NoelDeMartin
left a comment
There was a problem hiding this comment.
I've taken a quick look and it looks fine. There are some further improvements we could do, like migrate some files to typescript, use solidos-toolkit/testing for some testing helpers (like I did here), etc. But in general I think we can merge as it is.
The CI is failing, though. I guess that's because you need to update some dependencies to the latest dev.
|
Thank you. I didn't migrate to typescript because I did it already in the source card pr/ticket so once I merge to staging I'll pull into that branch and add anything missing. I'll see if I can fix the dependencies this weekend. |
Source pane migration to vite.