the game
1import { defineConfig } from "vite";
2
3const kaplayCongrats = () => {
4 return {
5 name: "vite-plugin-kaplay-hello",
6 buildEnd() {
7 const line = "---------------------------------------------------------";
8 const msg = `💝 feel free to hack on this and open a pr!`;
9
10 process.stdout.write(`\n${line}\n${msg}\n${line}\n`);
11 },
12 };
13};
14
15export default defineConfig({
16 // index.html out file will start with a relative path for script
17 base: "./",
18 server: {
19 port: 3001,
20 },
21 build: {
22 // disable this for low bundle sizes
23 sourcemap: true,
24 rollupOptions: {
25 output: {
26 manualChunks: {
27 kaplay: ["kaplay"],
28 },
29 },
30 },
31 },
32 plugins: [kaplayCongrats()],
33});
34