Migrate to Vite #225#228
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the project’s build tooling from Webpack/Babel to Vite (via solidos-toolkit) and updates packaging outputs to the new dist/ bundle format.
Changes:
- Removed Webpack/Babel configs and the old
dev/harness. - Added
vite.config.mtsand switched build scripts/output directory to Vite/dist. - Updated CI to run a shared “update deps” workflow and publish prereleases with OIDC permissions.
Reviewed changes
Copilot reviewed 11 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.module.rules.mjs | Removed Webpack loader rules as part of the Vite migration. |
| webpack.dev.config.mjs | Removed Webpack dev-server configuration. |
| webpack.config.mjs | Removed Webpack production build configs (UMD/min builds). |
| vite.config.mts | Added Vite configuration using solidos-toolkit build helpers. |
| tsconfig.json | Updated TS module resolution/output directory to align with Vite dist/. |
| src/index.ts | Added an explicit package entry module re-exporting the pane. |
| package.json | Updated scripts/entrypoints/exports and dependency layout for Vite builds. |
| dist/index.esm.js | Added built ESM entry output. |
| dist/index.cjs.js | Added built CJS entry output. |
| dist/index.d.ts | Added generated type entry output. |
| dist/index.d.ts.map | Added type map for the entry declarations. |
| dist/folderPane.esm.js | Added built ESM implementation output. |
| dist/folderPane.esm.js.map | Added source map for ESM output. |
| dist/folderPane.cjs.js | Added built CJS implementation output. |
| dist/folderPane.cjs.js.map | Added source map for CJS output. |
| dist/folderPane.d.ts | Added generated declarations for the implementation module. |
| dist/folderPane.d.ts.map | Added type map for implementation declarations. |
| dist/_virtual/_rolldown/runtime.cjs.js | Added bundler runtime helper output. |
| dev/index.js | Removed the old Webpack-based local dev harness JS entry. |
| dev/index.html | Removed the old dev-server HTML entry. |
| dev/dev-global.css | Removed dev-only global CSS used by the old harness. |
| dev/context.js | Removed dev harness context wiring. |
| babel.config.mjs | Removed Babel configuration no longer used with Vite. |
| .github/workflows/ci.yml | Updated CI triggers and added reusable dependency update + publish permission changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "description": "Solid-compatible Panes: File browser", | ||
| "main": "lib/folder-pane.js", | ||
| "types": "declarations.d.ts", | ||
| "main": "dist/folder-pane.cjs.js", |
| "devDependencies": { | ||
| "@babel/core": "^7.28.6", | ||
| "@babel/preset-env": "^7.28.6", | ||
| "@babel/preset-typescript": "^7.28.5", | ||
| "@eslint/eslintrc": "^3.3.3", | ||
| "@eslint/js": "^10.0.1", | ||
| "@types/node": "^25.0.10", | ||
| "@typescript-eslint/parser": "^8.53.1", | ||
| "babel-loader": "^10.1.1", | ||
| "copy-webpack-plugin": "^14.0.0", | ||
| "css-loader": "^7.1.4", | ||
| "eslint": "^10.0.1", | ||
| "globals": "^17.1.0", | ||
| "html-webpack-plugin": "^5.6.6", | ||
| "node-polyfill-webpack-plugin": "^4.1.0", | ||
| "style-loader": "^4.0.0", | ||
| "terser-webpack-plugin": "^5.4.0", | ||
| "typescript": "^5.9.3", | ||
| "webpack": "^5.96.1", | ||
| "webpack-cli": "^6.0.1", | ||
| "webpack-dev-server": "^5.2.3" | ||
| "@vitest/coverage-v8": "^4.0.18", | ||
| "solidos-toolkit": "dev" | ||
| }, | ||
| "dependencies": { | ||
| "patch-package": "^8.0.1", | ||
| "vite": "^8.0.16", | ||
| "vitest": "^4.0.18", | ||
| "vitest-axe": "^0.1.0", | ||
| "rdflib": "2.3.9", | ||
| "solid-logic": "4.0.8-0", | ||
| "solid-ui": "3.1.3-4" | ||
| "solid-logic": "4.0.8-1", | ||
| "solid-ui": "3.1.3-9" | ||
| }, |
| "preversion": "npm run typecheck && npm run lint", | ||
| "postpublish": "git push origin staging", | ||
| "start": "webpack serve --config webpack.dev.config.mjs --open" | ||
| "start": "vite" |
978e6a8 to
8758730
Compare
…@3.1.3-9) (latest: rdflib@2.4.0)
| ) | ||
| } | ||
|
|
||
| function simpleRow (obj) { |
There was a problem hiding this comment.
I'm not sure if I should do this or maybe just keep the old dev environment for folderPane.ts or should the toolkit be modified?
There was a problem hiding this comment.
Actually I wasn't thinking this doesn't work completely I just did further testing. Because it shouldn't just display it needs the outliner to show the content of the containers etc... so either we need to go back to dev or change the toolkit. I'm going to leave this until we discuss or comment in this PR for discussion.
NoelDeMartin
left a comment
There was a problem hiding this comment.
Looks good overall, but the dist files shouldn't be tracked in the repo.
There was a problem hiding this comment.
dist folder should be ignored
| objs.sort() // Sort by label case-insensitive | ||
| objs = objs.map(pair => pair[1]) | ||
| UI.utils.syncTableToArray(mainTable, objs, function (obj) { | ||
| if (!outliner) { |
There was a problem hiding this comment.
This looks like new functionality, why is that necessary to migrate to Vite?
There was a problem hiding this comment.
I made a note in the description. I will delete this bc it doesn’t work but I added it because folder pane needs the outliner in the dev environment. This was my attempt to get it working but this isn't all that's needed. We either need to modify toolkit or leave original dev env
There was a problem hiding this comment.
Ok, yeah it's ok to modify the Toolkit to work with other panes, the current implementation is very simple and I expect that it'll need to get improved.
In case you want to look into it, you should change the pane-sandbox.ts file. That code should be the equivalent of the dev/index.js we had in panes. As you can see, it has a getOutliner: () => null, but this could be replaced with returning an Outliner stub like the one we had in the dev/index.js of this pane.
|
Oops . What do you think we should do about the dev environment @NoelDeMartin |
Migrate to Vite
Note: toolkit didn't work with folder-pane for the dev environment. i had to modify folderPane.ts to make it work. Here is what ai said woudl need to be done to toolkit to make it work