@gameap/debug 0.2.11 → 0.2.12

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/package.json +1 -1
  2. package/vite.config.ts +15 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gameap/debug",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "type": "module",
5
5
  "description": "Debug harness for GameAP plugin development with mock API",
6
6
  "bin": {
package/vite.config.ts CHANGED
@@ -3,8 +3,21 @@ import vue from '@vitejs/plugin-vue'
3
3
  import { viteCommonjs } from '@originjs/vite-plugin-commonjs'
4
4
  import { resolve, dirname } from 'path'
5
5
  import { fileURLToPath } from 'url'
6
+ import { createRequire } from 'module'
6
7
 
7
8
  const __dirname = dirname(fileURLToPath(import.meta.url))
9
+ const require = createRequire(import.meta.url)
10
+
11
+ // Resolve @gameap/frontend CSS path using Node's module resolution
12
+ function resolveFrontendCss(): string {
13
+ try {
14
+ const frontendPkg = require.resolve('@gameap/frontend/package.json')
15
+ return resolve(dirname(frontendPkg), 'dist/frontend.css')
16
+ } catch {
17
+ // Fallback for development (local workspace)
18
+ return resolve(__dirname, '../gameap-frontend/dist/frontend.css')
19
+ }
20
+ }
8
21
 
9
22
  // Default plugin path - can be overridden via PLUGIN_PATH env variable
10
23
  function resolvePluginPath(): string {
@@ -38,6 +51,8 @@ export default defineConfig({
38
51
  { find: '@debug', replacement: resolve(__dirname, 'src') },
39
52
  // Plugin source (built bundle from external plugin)
40
53
  { find: '@plugin', replacement: resolvePluginPath() },
54
+ // Explicit CSS resolution for @gameap/frontend
55
+ { find: '@gameap/frontend/style.css', replacement: resolveFrontendCss() },
41
56
  ],
42
57
  },
43
58
  css: {