Skip to content

Commit

Permalink
fix react import
Browse files Browse the repository at this point in the history
  • Loading branch information
RSamaium committed Jan 26, 2024
1 parent 56e78fa commit 50f3666
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
40 changes: 38 additions & 2 deletions packages/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"lodash.merge": "4.6.2",
"pixi-viewport": "^5.0.2",
"pixi.js": "7.2.4",
"react-dom": "^18.2.0",
"rxjs": "7.8.0",
"simple-room-client": "^3.0.0",
"vue": "^3.2.47"
Expand Down
1 change: 0 additions & 1 deletion packages/client/src/Gui/Gui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export class Gui {
}

if (this.clientEngine.envs?.['VITE_REACT']) {
console.warn('[RPGJS] React GUI is experimental feature. So, its use may change over time. Not yet in production')
COMPONENT_LIBRARIES.push(await import('./React').then(m => m.ReactGui))
}

Expand Down
4 changes: 2 additions & 2 deletions packages/compiler/src/build/client-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function clientBuildConfig(dirname: string, options: ClientBuildCon
throw new Error('Invalid type. Choice between rpg or mmorpg')
}

const buildOptions = config.compilerOptions.build
const buildOptions = config.compilerOptions?.build

// found react packages in node_modules
const hasPkg = pkg => _fs.existsSync(join(cwd(), 'node_modules', pkg))
Expand All @@ -75,7 +75,7 @@ export async function clientBuildConfig(dirname: string, options: ClientBuildCon
let serverUrl = ''

if (isBuild) {
serverUrl = env.VITE_SERVER_URL = process.env.VITE_SERVER_URL ?? buildOptions.serverUrl ?? ''
serverUrl = env.VITE_SERVER_URL = process.env.VITE_SERVER_URL ?? buildOptions?.serverUrl ?? ''
}
else {
serverUrl = 'http://' + env.VITE_SERVER_URL
Expand Down

0 comments on commit 50f3666

Please sign in to comment.