Migrate UI build from rollup to tsc #114
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Migrate the UI module build process from rollup bundler to TypeScript compiler (tsc), matching the approach used by the exporter module. This simplifies the build toolchain while maintaining full functionality.
Changes
Build System
Configuration
src/exporter/andsrc/ui/directoriesvite.config.tsto.storybook/(only used by Storybook).gitignoreto exclude build artifacts while allowing build scriptsBuild Scripts
Add custom scripts to handle build steps that rollup previously managed:
generate-css-entry.js: Auto-generate CSS entry file with all importsfix-ui-build-output.js: Fix TypeScript output directory structureremove-css-imports.js: Remove CSS imports from compiled.jsand.d.tsfilesadd-use-client.js: Add 'use client' directives for Next.js App Router compatibilitypostcss-remove-dark.js: PostCSS plugin to create light-mode-only CSS variantPackage Changes
Documentation
Testing
Verified with
examples/app-routerusingnpm pack:Benefits
Breaking Changes
None. The package API and exports remain unchanged.