1
0
Fork 0
activist/vite.config.ts
Brian DeRocher 929f22abeb Upgrade dependencies.
Use user_id in places we were using username.  Still debating this.

Start getting this working with API backend, until there were calls to
/api/sticker which don't exist in the API yet.  Then I rediscovered the
local json-server.

So now there are 2 api backends.  We'll incrementally migrate from the
first version to the second.

SCSS and tailwind weren't working for nav-items.css.  The browser just
saw the raw version.  So for now, just inlined that.  Probably these
nav items will become components (if they are shared).
2025-10-22 09:19:37 -04:00

36 lines
838 B
TypeScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite';
import vue from '@vitejs/plugin-vue'
// import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
export default defineConfig({
plugins: [
vue(),
// vueDevTools(),
tailwindcss(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
proxy: {
'^/api/': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/api/, ''),
},
'^/api-2/': {
target: 'http://127.0.0.1:5000',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/api-2/, ''),
}
},
},
})