-
Notifications
You must be signed in to change notification settings - Fork 386
Stylex create app help and templates #1464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Update the help display to show available frameworks in a formatted multi-line list with descriptions and alignment, instead of a simple comma-separated string. The new format displays each template on its own line with: - Template ID (left-aligned with consistent padding) - Description of the template - "(recommended)" label for recommended templates Also simplify the --template option description to show only the supported github:owner/repo/path format.
Remove vite-plugin-devtools-json as it does not support Vite 7. The plugin only supports vite@^2.7.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0, causing npm install to fail with ERESOLVE peer dependency conflicts. This fix is required for create-stylex-app to work correctly, since the CLI fetches templates from the main branch on GitHub. Without this change, users selecting the react-router framework will get a broken project that fails to install dependencies. Changes: - Remove vite-plugin-devtools-json from devDependencies - Remove the import and devtoolsJson() plugin call from vite.config.ts - Remove now-unnecessary @ts-expect-error comments
Fix multiple dependency issues that prevented npm install from succeeding when using the redwoodsdk template with create-stylex-app. Issues fixed: 1. react-server-dom-webpack version mismatch: Updated from 19.2.1 to 19.3.0-canary-561ee24d-20251101 to align with react and react-dom versions. The old version required peer react@^19.2.1 which conflicted with the canary React version. 2. Missing capnweb peer dependency: Added capnweb@~0.2.0 which is required by rwsdk@1.0.0-beta.31 but was not installed. 3. @cloudflare/workers-types version: Updated from pinned 4.20251121.0 to ^4.20260120.0 to be compatible with wrangler@4.60.0 (the latest version that npm resolves from ^4.50.0). Testing process: 1. Run: node .../create-stylex-app/lib/index.js test-redwoodsdk --framework redwoodsdk --no-install 2. Apply fixes manually to generated project (until merged to main) 3. Run: npm install (should succeed without ERESOLVE errors) 4. Run: npm run dev (should start the dev server)
Add example:dev script and upgrade Vitest dependencies to fix issues when using the storybook template with create-stylex-app. Changes: 1. Add example:dev script that runs the Storybook dev server. The CLI's normalizeScripts function strips the "example:" prefix, so the generated project will have a "dev" script. This fixes the "Next steps" output which previously showed "npm run dev" but no dev script existed. 2. Upgrade @vitest/browser and @vitest/coverage-v8 from ^3.2.4 to ^4.0.13 (major version upgrade to Vitest v4). Testing: 1. Run: node .../create-stylex-app/lib/index.js test-storybook --framework storybook 2. Run: npm run dev (starts Storybook on port 6006)
The babel.config.mjs requires @babel/preset-flow but it was not listed in package.json. This caused the build to fail with "Cannot find module '@babel/preset-flow'" when users tried to build the project. Testing: 1. Run: node .../create-stylex-app/lib/index.js test-rollup --framework rollup 2. Run: npm run dev (or npm run build) 3. Verify: Build succeeds with "created .build/bundle.js"
Regenerate yarn.lock to reflect dependency updates across examples: - example-react-router: Removed vite-plugin-devtools-json - example-redwoodsdk: Added capnweb, updated react-server-dom-webpack and @cloudflare/workers-types - example-storybook: Upgraded @vitest/browser and @vitest/coverage-v8 to v4 - example-rollup: Added @babel/preset-flow
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
workflow: benchmarks/perfComparison of performance test results, measured in operations per second. Larger is better.
|
workflow: benchmarks/sizeComparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
|
- Rename package to create-stylex-app for npx usage - Remove private flag to allow publishing - Add templates.json to published files - Bump version to 0.1.0-alpha.2
What changed / motivation ?
Please include relevant motivation and context
Improved create-stylex-app CLI and fix example template dependencies.
CLI Changes:
with descriptions and "(recommended)" labels instead of a comma-separated string
Example Fixes:
to canary version, update @cloudflare/workers-types for wrangler compatibility
upgrade Vitest from v3 to v4
wasn't in package.json)
These fixes ensure all templates work out-of-the-box when users run create-stylex-app.
Linked PR/Issues
Fixes #1456
Additional Context
I installed dependencies and tested all of the templates which had npm run dev configs.
Testing process:
Pre-flight checklist
Contribution Guidelines