TanStackT
TanStack7mo ago
5 replies
wet-aqua

Tanstack start missing index.html for `static` build

We have just upgrade to use tanstack vite plugin, but for target static, it build to _shell.html instead of index.html, we can workaround by running a script but hope it can be fixed completely
This is our config
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import tsConfigPaths from 'vite-tsconfig-paths';
import {lingui} from '@lingui/vite-plugin';
import legacy from '@vitejs/plugin-legacy';
import tailwindcss from "tailwindcss";

export default defineConfig({
    plugins: [
        tsConfigPaths({
            projects: ['./tsconfig.json'],
        }),
        lingui(),

        tanstackStart({
            spa: {
                enabled:true,
                prerender: {
                    enabled: false,
                }
            },
            react: {
                babel: {
                    plugins: ['@lingui/babel-plugin-lingui-macro'],
                },
            },
            pages: [{
                path: '/',
                prerender: {
                    enabled: false
                }
            }],
            target: 'static',

        }),
        legacy({
            targets: ['defaults', 'not IE 11'],
            renderLegacyChunks: false,
            polyfills: ['es/object/has-own'],
        }),
    ],
    css: {
        postcss: {
            plugins: [tailwindcss()],
        },
    },
})
image.png
Was this page helpful?