the game
1import { defineConfig } from "vite";
2
3const kaplayCongrats = () => {
4 return {
5 name: "vite-plugin-kaplay-hello",
6 buildEnd() {
7 const line =
8 "---------------------------------------------------------";
9 const msg = `🦖 Awesome pal! Send your game to us:\n\n💎 Discord: https://discord.com/invite/aQ6RuQm3TF \n💖 Donate to KAPLAY: https://opencollective.com/kaplay\n\ (you can disable this msg on vite.config)`;
10
11 process.stdout.write(`\n${line}\n${msg}\n${line}\n`);
12 },
13 };
14};
15
16export default defineConfig({
17 // index.html out file will start with a relative path for script
18 base: "./",
19 server: {
20 port: 3001,
21 },
22 build: {
23 // disable this for low bundle sizes
24 sourcemap: true,
25 rollupOptions: {
26 output: {
27 manualChunks: {
28 kaplay: ["kaplay"],
29 },
30 },
31 },
32 },
33 plugins: [
34 // Disable messages removing this line
35 kaplayCongrats(),
36 ],
37});