Skip to content

fix #56 - feat: Convert tsc configuration to vite build#61

Open
fantonangeli wants to merge 9 commits intoserverlessworkflow:mainfrom
fantonangeli:issue-56-Convert-tsc-configuration-to-vite-build
Open

fix #56 - feat: Convert tsc configuration to vite build#61
fantonangeli wants to merge 9 commits intoserverlessworkflow:mainfrom
fantonangeli:issue-56-Convert-tsc-configuration-to-vite-build

Conversation

@fantonangeli
Copy link
Copy Markdown
Member

Closes #56

Description

Summary

We still have some ŧsc configuration in our package.json files which we should convert to vite build command using: https://vite.dev/guide/#command-line-interface

Current configuration:

"build:prod": "pnpm lint && pnpm clean && tsc -p tsconfig.json && pnpm test",

Goals

  • Build our source using vite
  • The CI should fail if the build is not successful

Non-Goals

  • Replace entirely tsc build in the repository
  • Disable or break linting configuration
  • Disable or break tsc type checking

Motivation

Get the bundling advantages from vite, and improved performance

Proposed Implementation

Take inspiration from "vite-react-typescript-starter": https://github.com/vitejs/vite/blob/main/packages/create-vite/template-react-ts/package.json

Definition of Done

  • Implementation: Fully implemented according to the Serverless Workflow spec.
  • Unit Tests: Comprehensive unit tests are included and passing.
  • Integration Tests: Verified within the monorepo and target environments (Web/VS Code).
  • Documentation: Updated README.md, ADRs, or official docs.
  • Performance: No significant regression in editor responsiveness.
  • Accessibility: UI changes comply with accessibility standards.

Preview with error:

fantonan:serverless-workflow-diagram-editor$ pnpm build:dev

> @serverlessworkflow/diagram-editor@0.0.0 build:dev /home/fantonan/NotBackedUp/repos/serverlessworkflow-editor/packages/serverless-workflow-diagram-editor
> pnpm clean && tsc -p tsconfig.json && vite build


> @serverlessworkflow/diagram-editor@0.0.0 clean /home/fantonan/NotBackedUp/repos/serverlessworkflow-editor/packages/serverless-workflow-diagram-editor
> rimraf ./dist

src/diagram-editor/DiagramEditor.tsx:28:7 - error TS2322: Type 'number' is not assignable to type 'string'.

28 const testTypeError: string = 123;

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
…c-configuration-to-vite-build

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
@fantonangeli fantonangeli marked this pull request as ready for review April 13, 2026 09:24
Copilot AI review requested due to automatic review settings April 13, 2026 09:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 @serverlessworkflow/diagram-editor and @serverlessworkflow/i18n package build pipeline from “tsc-only” output to a “tsc declarations + Vite library build” flow, aiming to keep TypeScript type-checking while producing bundled JS via Vite.

Changes:

  • Add Vite library build configuration for packages/serverless-workflow-diagram-editor and packages/i18n.
  • Update package build scripts to run tsc -p ... followed by vite build, and adjust TS configs to emit declarations only.
  • Update the workspace catalog + lockfile to use Vite ^6.4.1.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Bumps Vite catalog version and reorders an entry.
pnpm-lock.yaml Updates locked Vite version and dependency graph.
packages/serverless-workflow-diagram-editor/vite.config.ts Introduces Vite lib build config for the diagram editor package.
packages/serverless-workflow-diagram-editor/tsconfig.json Changes TS emit to declarations-only and ensures no emit on type errors.
packages/serverless-workflow-diagram-editor/package.json Updates build scripts to include vite build.
packages/i18n/vite.config.ts Introduces Vite lib build config for the i18n package.
packages/i18n/tsconfig.json Changes TS emit to declarations-only and ensures no emit on type errors.
packages/i18n/package.json Updates build script to include vite build and adds vite devDependency.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the build pipeline for the @serverlessworkflow/i18n and @serverlessworkflow/diagram-editor packages to generate bundled JS output via vite build while keeping tsc in the loop for type-checking and .d.ts emission, aligning with issue #56’s goal of moving away from “tsc-only” build scripts.

Changes:

  • Add Vite library build configs (vite.config.ts) for i18n and diagram-editor.
  • Update package build scripts to run tsc (declarations only) followed by vite build.
  • Update workspace catalog + lockfile to use Vite ^6.4.1 and reflect dependency changes.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pnpm-workspace.yaml Bumps the workspace Vite version and reorders catalog entries.
pnpm-lock.yaml Updates lockfile to reflect Vite version bump and new Vite usage in packages/i18n.
packages/serverless-workflow-diagram-editor/vite.config.ts Introduces Vite library-mode build settings for bundling the diagram editor package.
packages/serverless-workflow-diagram-editor/tsconfig.json Switches tsc output to declarations-only to pair with Vite for JS output.
packages/serverless-workflow-diagram-editor/package.json Updates build scripts to run vite build after tsc.
packages/i18n/vite.config.ts Introduces Vite library-mode build settings for bundling the i18n package.
packages/i18n/tsconfig.json Switches tsc output to declarations-only to pair with Vite for JS output.
packages/i18n/package.json Updates build script to run vite build and adds vite as a devDependency.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Copy link
Copy Markdown
Contributor

@lornakelly lornakelly left a comment

Choose a reason for hiding this comment

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

Nice work, LGTM

…c-configuration-to-vite-build

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the build pipeline for selected workspace packages to run Vite’s library build output alongside TypeScript declaration generation, aligning with issue #56’s goal of moving away from tsc-only builds while keeping type-checking enforced.

Changes:

  • Add Vite library build configs (vite.config.ts) for @serverlessworkflow/i18n and @serverlessworkflow/diagram-editor.
  • Update package build scripts to run tsc (declarations only) followed by vite build.
  • Adjust package TS configs to emit declarations only and fail on type errors.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pnpm-lock.yaml Adds Vite to the lockfile for the i18n package importer.
packages/serverless-workflow-diagram-editor/vite.config.ts Introduces Vite library build configuration for the diagram editor package.
packages/serverless-workflow-diagram-editor/tsconfig.json Switches build-time TS emit to declarations-only and enforces no-emit-on-error.
packages/serverless-workflow-diagram-editor/package.json Updates build scripts to run vite build after tsc.
packages/i18n/vite.config.ts Introduces Vite library build configuration for the i18n package.
packages/i18n/tsconfig.json Switches build-time TS emit to declarations-only and enforces no-emit-on-error.
packages/i18n/package.json Updates build script to run vite build after tsc and adds Vite devDependency.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

serverlessworkflow#61 (comment)
serverlessworkflow#61 (comment)

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
@fantonangeli
Copy link
Copy Markdown
Member Author

Sync done. This PR is ready again now

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

None yet

Development

Successfully merging this pull request may close these issues.

feat: Convert tsc configuration to vite build

4 participants