Template
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>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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',
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user