Files
interview-demo-code/frontend/spa/vite.config.js
Nikita Kiselev 3abcb18f0c
Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled
Squashed commit message
2026-03-11 22:55:28 +03:00

52 lines
1.2 KiB
JavaScript

import {defineConfig} from "vite";
import tailwindcss from "@tailwindcss/vite";
import vue from "@vitejs/plugin-vue";
import {fileURLToPath, URL} from 'node:url';
export default defineConfig({
plugins: [
tailwindcss(),
vue({
template: {
compilerOptions: {
isCustomElement: tag => tag.startsWith('swiper-'),
},
},
}),
],
base: '/image/catalog/tgshopspa/',
build: {
outDir: '../../module/oc_telegram_shop/upload/image/catalog/tgshopspa',
emptyOutDir: true,
sourcemap: false,
manifest: true,
minify: 'terser',
reportCompressedSize: true,
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true,
},
},
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
host: true,
allowedHosts: ["api.example.com"],
proxy: {
'/index.php': {
target: 'http://localhost:8000',
changeOrigin: true,
rewrite: path => path,
}
}
},
});