Search Results
6/24/2025, 2:11:56 PM
>>105686488
awesome. I built a docker image for it so I can self-host on my server. now I can reference it easily
dockerfile
FROM node:18-alpine
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . ./
EXPOSE 3104
CMD ["npm", "run", "dev"]
modified vite config
// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { tanstackRouter } from '@tanstack/router-plugin/vite'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig(() => {
return {
server: {
host: true,
allowedHosts: true,
port: 3104,
},
plugins: [
// Please make sure that '@tanstack/router-plugin' is passed before '@vitejs/plugin-react'
tanstackRouter({
target: 'react',
autoCodeSplitting: true,
}),
react(),
tailwindcss(),
],
preview: {
headers: {
'Cache-Control': 'public, max-age=600',
},
},
};
})
awesome. I built a docker image for it so I can self-host on my server. now I can reference it easily
dockerfile
FROM node:18-alpine
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . ./
EXPOSE 3104
CMD ["npm", "run", "dev"]
modified vite config
// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { tanstackRouter } from '@tanstack/router-plugin/vite'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig(() => {
return {
server: {
host: true,
allowedHosts: true,
port: 3104,
},
plugins: [
// Please make sure that '@tanstack/router-plugin' is passed before '@vitejs/plugin-react'
tanstackRouter({
target: 'react',
autoCodeSplitting: true,
}),
react(),
tailwindcss(),
],
preview: {
headers: {
'Cache-Control': 'public, max-age=600',
},
},
};
})
Page 1