SCSS manifest plugin for Vite + Vite-based litmus setup - #1318
Open
mstijak wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Adds cx-scss-manifest-vite-plugin — the Vite counterpart of
cx-scss-manifest-webpack-plugin— and converts litmus to optionally run on Vite 8 to prove it out end-to-end.packages/cx-scss-manifest-vite-plugines-module-lexerin thetransformhook, validates candidates againstcx/manifest.js, and generates the samemanifest.scssformat as the webpack plugin (files are interchangeable between the two).Repeaterfromcx/widgets→ui/Repeater), deep imports, and skipsimport typestatements andnode_modules.manifest.scssas a sass dependency, so new widget styles hot-reload without a page refresh.fix(cx): type-only re-exportsThree type-only names were re-exported as values (
AccessorChaininui/index.ts,JSXinjsx-dev-runtime.ts,GridRowConfiginGrid.tsx). Babel tolerated this, but any isolated-modules transpiler (esbuild/oxc/swc) keeps the import and fails at runtime — this breaks alljsxImportSource: "cx"source-consuming setups, not just litmus. Fixed withexport type(verified viatsc --isolatedModules, which now reports no TS1205 errors).feat(litmus): Vite setup alongside webpackyarn start:vite(port 8090) /yarn build:vite; the webpack workflow is untouched.cx/*topackages/cx/src— framework source edits hot-reload directly, no compile step.jsxImportSource: "cx"(no babel). Legacy.jsdemos containing JSX go through a small esbuild bridge plugin, since rolldown's built-in transform doesn't allow enabling JSX for.js(itsTransformOptions.langis ignored in the native plugin). The active demo is renamed to.tsxas the migration path — pure oxc handles those.Testing
yarn check-typesclean;yarn test— 535 passing, 1 pre-existing failure on master (babel-plugin-transform-cx-importsvs. staledist/manifest.jsafter thecx/widgetsbarrel refactor, unrelated to this PR).