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 'config.php', 18 '.env', 19 'client-metadata.json', 20 'jwks.json', 21 'oauth/*', 22 'oauth/**/*.json', 23 'templates/**/*.latte', 24 '*.log' 25 ] 26 }), 27 //removeConsole(), 28 viteStaticCopy({ 29 targets: [ 30 { 31 src: 'vendor', 32 dest: '' 33 }, 34 { 35 src: 'pages', 36 dest: '' 37 }, 38 { 39 src: 'lib', 40 dest: '' 41 } 42 ] 43 }) 44 ], 45 resolve: { 46 alias: { 47 '@scripts': '/js', 48 '@styles': '/css', 49 '@fonts': '/fonts', 50 '@images': '/images', 51 '@vendor': '/vendor' 52 }, 53 }, 54})