diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 27afd72710c..f8c09e75248 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -26,19 +26,16 @@ jobs: uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - - name: Start Nx Agents - run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" - name: Setup Tools uses: tanstack/config/.github/setup@main + - name: Install Playwright browsers + run: pnpm exec playwright install - name: Get base and head commits for `nx affected` uses: nrwl/nx-set-shas@v4.4.0 with: main-branch-name: main - name: Run Checks run: pnpm run test:pr --parallel=3 - - name: Stop Nx Agents - if: ${{ always() }} - run: npx nx-cloud stop-all-agents preview: name: Preview runs-on: ubuntu-latest @@ -52,4 +49,5 @@ jobs: - name: Build Packages run: pnpm run build:all - name: Publish Previews + if: ${{ github.repository_owner == 'TanStack' }} run: pnpx pkg-pr-new publish --pnpm './packages/*' --template './examples/*/*' diff --git a/packages/react-router/eslint.config.ts b/packages/react-router/eslint.config.ts index 5d879181f79..d5fcd3aec86 100644 --- a/packages/react-router/eslint.config.ts +++ b/packages/react-router/eslint.config.ts @@ -8,6 +8,12 @@ export default [ { files: ['src/**/*.{ts,tsx}', 'tests/**/*.{ts,tsx}'], }, + { + files: ['llms/rules/**/*.ts'], + rules: { + 'no-useless-escape': 'off', + }, + }, { plugins: { 'react-hooks': pluginReactHooks, diff --git a/packages/start-plugin-core/src/rsbuild/plugin.ts b/packages/start-plugin-core/src/rsbuild/plugin.ts index 79ab11ed90a..e0d9214dadf 100644 --- a/packages/start-plugin-core/src/rsbuild/plugin.ts +++ b/packages/start-plugin-core/src/rsbuild/plugin.ts @@ -327,6 +327,7 @@ export function TanStackStartRsbuildPluginCore( ) const isDev = api.context?.command === 'serve' + const isBuild = api.context?.command === 'build' const defineViteEnv = (key: string, fallback = '') => { const value = process.env[key] ?? fallback return defineReplaceEnv(key, value) @@ -348,6 +349,13 @@ export function TanStackStartRsbuildPluginCore( : {}), ...defineViteEnv('VITE_NODE_ENV', 'production'), ...defineViteEnv('VITE_EXTERNAL_PORT', ''), + ...(isBuild && startConfig.server.build.staticNodeEnv + ? { + 'process.env.NODE_ENV': JSON.stringify( + process.env.NODE_ENV ?? 'production', + ), + } + : {}), } const routerPlugins = tanStackStartRouterRsbuild( @@ -737,20 +745,20 @@ export function TanStackStartRsbuildPluginCore( clientOutputDir, serverOutputDir, }) - if (routeTreeGeneratedPath && routeTreeModuleDeclaration) { - if (fs.existsSync(routeTreeGeneratedPath)) { - const existingTree = fs.readFileSync( - routeTreeGeneratedPath, - 'utf-8', - ) - if (!existingTree.includes(routeTreeModuleDeclaration)) { - fs.appendFileSync( - routeTreeGeneratedPath, - `\n\n${routeTreeModuleDeclaration}\n`, - ) - } - } + if (routeTreeGeneratedPath && routeTreeModuleDeclaration) { + if (fs.existsSync(routeTreeGeneratedPath)) { + const existingTree = fs.readFileSync( + routeTreeGeneratedPath, + 'utf-8', + ) + if (!existingTree.includes(routeTreeModuleDeclaration)) { + fs.appendFileSync( + routeTreeGeneratedPath, + `\n\n${routeTreeModuleDeclaration}\n`, + ) } + } + } }) }, },