This commit is contained in:
2025-03-11 18:09:23 +08:00
commit fe4f8161e1
38 changed files with 6824 additions and 0 deletions

13
vite/config.dev.mjs Normal file
View File

@@ -0,0 +1,13 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
base: './',
plugins: [
react(),
],
server: {
port: 8080
}
})

46
vite/config.prod.mjs Normal file
View File

@@ -0,0 +1,46 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
const phasermsg = () => {
return {
name: 'phasermsg',
buildStart() {
process.stdout.write(`Building for production...\n`);
},
buildEnd() {
const line = "---------------------------------------------------------";
const msg = `❤️❤️❤️ Tell us about your game! - games@phaser.io ❤️❤️❤️`;
process.stdout.write(`${line}\n${msg}\n${line}\n`);
process.stdout.write(`✨ Done ✨\n`);
}
}
}
export default defineConfig({
base: './',
plugins: [
react(),
phasermsg()
],
logLevel: 'warning',
build: {
rollupOptions: {
output: {
manualChunks: {
phaser: ['phaser']
}
}
},
minify: 'terser',
terserOptions: {
compress: {
passes: 2
},
mangle: true,
format: {
comments: false
}
}
}
});