fix #56 - feat: Convert tsc configuration to vite build#61
fix #56 - feat: Convert tsc configuration to vite build#61fantonangeli wants to merge 6 commits intoserverlessworkflow:mainfrom
Conversation
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>
There was a problem hiding this comment.
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-editorandpackages/i18n. - Update package build scripts to run
tsc -p ...followed byvite 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>
There was a problem hiding this comment.
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) fori18nanddiagram-editor. - Update package build scripts to run
tsc(declarations only) followed byvite build. - Update workspace catalog + lockfile to use Vite
^6.4.1and 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.
Closes #56
Description
Summary
We still have some
ŧscconfiguration in ourpackage.jsonfiles which we should convert tovite buildcommand using: https://vite.dev/guide/#command-line-interfaceCurrent configuration:
editor/packages/serverless-workflow-diagram-editor/package.json
Line 35 in 33bdc2d
Goals
Non-Goals
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
Preview with error: