@littlepartytime/sdk 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/GAME_DEV_GUIDE.md +17 -1
  2. package/package.json +1 -1
package/GAME_DEV_GUIDE.md CHANGED
@@ -608,7 +608,7 @@ This command:
608
608
  3. Reads `GameConfig` from the built engine to extract metadata
609
609
  4. Validates the required image assets (format, dimensions, aspect ratio)
610
610
  5. Validates `rules.md` exists and is non-empty
611
- 6. If `GameConfig.demo` is set, validates that `demo/dist/index.html` exists
611
+ 6. If `GameConfig.demo` is set, validates that `demo/dist/index.html` exists and uses relative paths (no absolute `src="/..."` or `href="/..."` references)
612
612
  7. Generates `manifest.json` from your config
613
613
  8. Creates a `.zip` file in the `dist/` directory containing code, manifest, rules, images, and optional demo site
614
614
 
@@ -644,6 +644,22 @@ The `.zip` upload package contains:
644
644
  └── index.html
645
645
  ```
646
646
 
647
+ ### Demo Site Configuration
648
+
649
+ If your game includes a demo site (`GameConfig.demo` is set), the demo SPA will be deployed to a CDN subdirectory (e.g. `games/{gameId}/demo/`). **You must set `base: './'` in the demo's Vite config** to ensure all asset references use relative paths. Absolute paths like `/assets/...` will resolve to the CDN root and cause 404 errors.
650
+
651
+ ```typescript
652
+ // demo/vite.config.ts
653
+ import { defineConfig } from "vite";
654
+
655
+ export default defineConfig({
656
+ base: "./",
657
+ // ... other config
658
+ });
659
+ ```
660
+
661
+ The `pack` command will check `demo/dist/index.html` for absolute path references and report an error if any are found.
662
+
647
663
  ### Configuration
648
664
 
649
665
  The `lpt.config.ts` file configures local development. The `gameId` is a local project identifier used for the zip filename and dev server — it is NOT the platform game ID (the platform assigns that upon upload):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@littlepartytime/sdk",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Game SDK for Little Party Time platform - type definitions and testing utilities",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",