Files
vite-shopify-storefront/vite.config.ts
T
Rami BitarandClaude Opus 5.5 c447c51e82 Vite + Hono + TanStack port of the Shopify storefront
Ports nextjs-templates/shopify-storefront to Vite, TanStack Router/Query,
Tailwind v4 and Hono, without the AI store assistant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 11:27:27 -04:00

31 lines
892 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
import { tanstackRouter } from '@tanstack/router-plugin/vite';
import devServer from '@hono/vite-dev-server';
import { fileURLToPath, URL } from 'node:url';
export default defineConfig({
plugins: [
// Must run before the React plugin so the generated route tree is in place.
tanstackRouter({ target: 'react', autoCodeSplitting: true }),
react(),
tailwindcss(),
// Serves the Hono API in dev. Everything outside /api falls through to
// Vite, which serves the SPA.
devServer({
entry: 'server/app.ts',
exclude: [/^(?!\/api(\/|$)).*/],
injectClientScript: false,
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
build: {
outDir: 'dist/client',
},
});