TanStack / TanStack/router

add`@vitejs/plugin-legacy`,build error

Open
#3,904 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

information needed
Dominant language
TypeScript
Stars
15.1k
Forks
1.9k
Avg merge
1d 20h
Merged PRs (30d)
143

Description

Which project does this relate to?

Start

Describe the bug
import { defineConfig } from '@tanstack/solid-start/config';
import tsConfigPaths from 'vite-tsconfig-paths';
import legacy from '@vitejs/plugin-legacy';

export default defineConfig({
  tsr: {
    appDirectory: 'src',
  },
  vite: {
    plugins: [
      tsConfigPaths({
        projects: ['./tsconfig.json'],
      }),
      legacy(),
    ],
  },
});

run shell npm run build

will throw error

Image
Your Example Website or App

.

Steps to Reproduce the Bug or Issue

.

Expected behavior

not error

Screenshots or Videos

"@tanstack/solid-start": "^1.114.31"

Platform

"@tanstack/solid-start": "^1.114.31"

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided TypeScript configuration and reproduce the problem by running npm run build with @vitejs/plugin-legacy enabled. Read the build error shown in the attached image and trace how the Solid Start Vite configuration handles that plugin; done means the build completes without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vite
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.