-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Added tanstack start plugin #255
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
|
View your CI Pipeline Execution ↗ for commit 0207fd0
☁️ Nx Cloud last updated this comment at |
| function getAssetType(item: { fileName?: string; name?: string }): string { | ||
| const fileName = item.fileName || item.name || ''; | ||
| const ext = path.extname(fileName).toLowerCase(); | ||
| const typeMap: Record<string, string> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we include .cjs in this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workers don't support commonsjs
| console.log(`[TanStack Zephyr] Output directory: ${outputDir}`); | ||
| console.log(`[TanStack Zephyr] Server entrypoint: ${entrypoint}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove these logs and make it use Zephyrs ?
| "zephyr-agent": "workspace:*" | ||
| }, | ||
| "peerDependencies": { | ||
| "@tanstack/start": "^1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be @tanstack/react-start ?
| "@tanstack/start": "^1.0.0" | |
| "@tanstack/react-start": "^1.0.0" |
| import type { OutputBundle, OutputAsset, OutputChunk } from 'rollup'; | ||
|
|
||
| /** Recursively get all files in a directory */ | ||
| async function getAllFiles(dir: string, baseDir?: string): Promise<string[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't node have a fs.readdir(dirPath, { recursive: true })?
|
|
||
| // Load ALL build output preserving directory structure | ||
| // This includes server/, client/, and any root files (favicon.ico, etc.) | ||
| const bundle = await loadTanStackOutput(outputDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is more a question than a review comment, but couldn't we hijack the onGenerateBundle from Vite's to grab all built assets instead of having to read dist folder and all complications it have?
What's added in this PR?
Screenshots
What's the issues or discussion related to this PR ?
What are the steps to test this PR?
Documentation update for this PR (if applicable)?
(Optional) What's left to be done for this PR?
(Optional) What's the potential risk and how to mitigate it?
(Required) Pre-PR/Merge checklist