Skip to content

Migrate to Vite #225#228

Open
SharonStrats wants to merge 2 commits into
stagingfrom
feat/migrate-vite
Open

Migrate to Vite #225#228
SharonStrats wants to merge 2 commits into
stagingfrom
feat/migrate-vite

Conversation

@SharonStrats

@SharonStrats SharonStrats commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

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

To avoid changing [folderPane.ts](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html), toolkit needs one of these:

A real outliner in the sandbox context, created the same way mashlib or solid-panes does it.
Or a compatibility shim that implements the specific outliner API folder-pane uses: VIEWAS_boring_default, propertyTR, outlineObjectTD, and GotoSubject.
Practically, that means the sandbox should stop being a minimal pane-only harness and instead initialize the outline manager from pane-registry/solid-panes before rendering the pane. Then folder-pane can stay unchanged and still work in standalone start mode.

@SharonStrats SharonStrats self-assigned this Jul 5, 2026
Copilot AI review requested due to automatic review settings July 5, 2026 10:11
@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 changed the base branch from main to staging July 5, 2026 10:11
@SharonStrats SharonStrats requested a review from NoelDeMartin July 5, 2026 10:12

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 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.mts and 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.

Comment thread package.json
"description": "Solid-compatible Panes: File browser",
"main": "lib/folder-pane.js",
"types": "declarations.d.ts",
"main": "dist/folder-pane.cjs.js",
Comment thread package.json
Comment on lines 58 to 76
"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"
},
Comment thread package.json
"preversion": "npm run typecheck && npm run lint",
"postpublish": "git push origin staging",
"start": "webpack serve --config webpack.dev.config.mjs --open"
"start": "vite"
Comment thread src/folderPane.ts
)
}

function simpleRow (obj) {

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.

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?

@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.

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 NoelDeMartin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good overall, but the dist files shouldn't be tracked in the repo.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dist folder should be ignored

Comment thread src/folderPane.ts
objs.sort() // Sort by label case-insensitive
objs = objs.map(pair => pair[1])
UI.utils.syncTableToArray(mainTable, objs, function (obj) {
if (!outliner) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like new functionality, why is that necessary to migrate to Vite?

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.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@SharonStrats

Copy link
Copy Markdown
Contributor Author

Oops .

What do you think we should do about the dev environment @NoelDeMartin

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

3 participants