friendship ended with social-app. php is my new best friend
1import { dirname, resolve } from 'node:path'; 2import { fileURLToPath } from 'node:url'; 3import { defineConfig } from 'vite'; 4import usePHP from 'vite-plugin-php'; 5import { VitePWA } from 'vite-plugin-pwa'; 6import removeConsole from "vite-plugin-remove-console"; 7import { viteStaticCopy } from 'vite-plugin-static-copy'; 8 9const __dirname = dirname(fileURLToPath(import.meta.url)); 10 11export default defineConfig({ 12 base: '/', 13 plugins: [ 14 usePHP({ 15 entry: [ 16 'index.php', 17 'oauth/*', 18 'oauth/**/*.json', 19 'templates/**/*.latte', 20 '*.log' 21 ] 22 }), 23 //removeConsole(), 24 viteStaticCopy({ 25 targets: [ 26 { 27 src: 'vendor', 28 dest: '' 29 }, 30 { 31 src: 'pages', 32 dest: '' 33 }, 34 { 35 src: 'lib', 36 dest: '' 37 } 38 ] 39 }) 40 ], 41 resolve: { 42 alias: { 43 '@scripts': '/js', 44 '@styles': '/css', 45 '@fonts': '/fonts', 46 '@images': '/images', 47 '@vendor': '/vendor' 48 }, 49 }, 50})