diff --git a/tailwind.config.js b/tailwind.config.js index 5702d9c..f12c510 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,9 +1,9 @@ -console.log('tailwind.config.js') +console.log('tailwind.config.js'); /** @type {import('tailwindcss').Config} */ export default { - darkMode: ["class"], + darkMode: ['class'], content: ['./src/**/*.{ts,tsx}'], - plugins: [require('@tailwindcss/aspect-ratio'), require('@tailwindcss/typography')], + plugins: [require('@tailwindcss/aspect-ratio'), require('@tailwindcss/typography'), require('tailwindcss-animate')], theme: { extend: {}, screen: { @@ -23,9 +23,8 @@ export default { // => @media (min-width: 1536px) { ... } '3xl': '1920px', // => @media (min-width: 1920) { ... } - '4xl': '2560px' + '4xl': '2560px', // => @media (min-width: 2560) { ... } - } + }, }, - plugins: [require("tailwindcss-animate")] -} +}; diff --git a/vite.config.ts b/vite.config.ts index db03c58..4963152 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,34 +1,42 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' -import tailwindcss from 'tailwindcss' -import autoprefixer from 'autoprefixer' -import path from 'path' -import nesting from 'tailwindcss/nesting' +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import tailwindcss from 'tailwindcss'; +import autoprefixer from 'autoprefixer'; +import path from 'path'; +import nesting from 'tailwindcss/nesting'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], css: { postcss: { - plugins: [nesting, tailwindcss, autoprefixer] - } + plugins: [nesting, tailwindcss, autoprefixer], + }, }, resolve: { alias: { - '@': path.resolve(__dirname, './src') - } + '@': path.resolve(__dirname, './src'), + }, }, define: { - DEV_SERVER: JSON.stringify(process.env.NODE_ENV === 'development') + DEV_SERVER: JSON.stringify(process.env.NODE_ENV === 'development'), }, server: { port: 6004, + host: '0.0.0.0', proxy: { '/api': { target: 'http://localhost:3000', changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/, '/api') - } - } - } -}) + rewrite: (path) => path.replace(/^\/api/, '/api'), + }, + '/api/router': { + target: 'ws://localhost:3003', + changeOrigin: true, + ws: true, + rewriteWsOrigin: true, + rewrite: (path) => path.replace(/^\/api/, '/api'), + }, + }, + }, +});