Skip to content

Conversation

@netomi
Copy link
Contributor

@netomi netomi commented Nov 10, 2025

This PR is intended to migrate the existing frontend build system to use vite.

Changes:

  • use modern jsx transform avoiding the need to import React
  • use vite for building and running a dev server
  • update tsconfig
  • update docker build and compose configs

@netomi netomi marked this pull request as ready for review November 18, 2025 10:00
@netomi
Copy link
Contributor Author

netomi commented Nov 18, 2025

To run a dev server you can just enter yarn watch:default

Running yarn run build will build the library in /lib which is needed for publishing to npm and building open-vsx.org.

The default server can be built using yarn build:default and then executed with yarn start:default.

I did not touch the existing tsconfig as much as possible, but it could be further improved.

Vite does not use tsc for building but rather uses esbuild, so the tsconfig for building the app has an explicit noEmit: true to get warning but not emit js files as this would be useless.

Copy link
Contributor

@gnugomez gnugomez left a comment

Choose a reason for hiding this comment

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

LGTM overall

"build:default": "webpack --config ./configs/webpack.config.js --mode production",
"watch:default": "webpack --config ./configs/webpack.config.js --mode development --watch --progress --color",
"build:default": "tsc -p ./configs/server.tsconfig.json && vite build",
"watch:default": "vite serve",
Copy link
Contributor

Choose a reason for hiding this comment

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

question (non-blocking): why did you changed this script to watch:default from dev?

Vite dev server does not generate any output, it acts as a middleware server that transforms whatever you ask for on the fly, thus it gets a bit confusing to me the wording watch since this has historically been used for tools like babel or webpack where we live transpile code and generate an output. I would argue to leave it as dev as it already is a widely adopted convention.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept the previous script as is, dev:default would probably be more appropriate.

The suffix :default is still useful imho, as you need to distinguish between the component library and the app you are building.

@netomi
Copy link
Contributor Author

netomi commented Nov 26, 2025

any objection to merge that PR?

That would make frontend development less painful.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants