@rpgjs/vite 5.0.0-alpha.36 → 5.0.0-alpha.39

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpgjs/vite",
3
- "version": "5.0.0-alpha.36",
3
+ "version": "5.0.0-alpha.39",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "keywords": [],
@@ -14,7 +14,7 @@
14
14
  "dependencies": {
15
15
  "@canvasengine/compiler": "2.0.0-beta.53",
16
16
  "@hono/vite-dev-server": "^0.25.0",
17
- "@rpgjs/server": "5.0.0-alpha.36",
17
+ "@rpgjs/server": "5.0.0-alpha.39",
18
18
  "@types/node": "^25.2.3",
19
19
  "acorn": "^8.15.0",
20
20
  "acorn-walk": "^8.3.4",
@@ -1,6 +1,8 @@
1
1
  import { defineConfig, build } from "vite";
2
2
  import canvasengine from "@canvasengine/compiler";
3
3
  import dts from "vite-plugin-dts";
4
+ import { existsSync } from "node:fs";
5
+ import { resolve } from "node:path";
4
6
  import { directivePlugin, removeImportsPlugin } from "./index";
5
7
 
6
8
  /**
@@ -22,6 +24,14 @@ import { directivePlugin, removeImportsPlugin } from "./index";
22
24
  */
23
25
  function createBuildConfig({ side, watch }: { side: 'client' | 'server', watch: boolean }) {
24
26
  const isClient = side === 'client';
27
+ const runtimeDir = resolve(process.cwd(), "runtime");
28
+ const resolveOptions = existsSync(runtimeDir)
29
+ ? {
30
+ alias: {
31
+ "@common": runtimeDir,
32
+ },
33
+ }
34
+ : undefined;
25
35
 
26
36
  const plugins = isClient
27
37
  ? [
@@ -36,6 +46,7 @@ function createBuildConfig({ side, watch }: { side: 'client' | 'server', watch:
36
46
 
37
47
  return {
38
48
  configFile: false as const, // Prevent using this config file
49
+ resolve: resolveOptions,
39
50
  plugins: [
40
51
  ...plugins,
41
52
  dts({
@@ -57,7 +68,9 @@ function createBuildConfig({ side, watch }: { side: 'client' | 'server', watch:
57
68
  rollupOptions: {
58
69
  external: [
59
70
  /@rpgjs/,
71
+ /@signestack/,
60
72
  "canvasengine",
73
+ "pixi.js",
61
74
  "esbuild",
62
75
  "@canvasengine/presets",
63
76
  "rxjs",