From 7badacd24a29d0aa2a2d2c4a2ee8d03a495de8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pasteau?= <4895034+ClementPasteau@users.noreply.github.com> Date: Tue, 9 Jul 2024 12:06:10 +0200 Subject: [PATCH] Fix not building peerjs for web runtime (#6758) --- .gitattributes | 1 + GDJS/scripts/lib/runtime-files-list.js | 13 ++++++++++++- tsconfig.json | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 4dddc3a1c0..bba11f49f4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,6 +5,7 @@ Extensions/PhysicsBehavior/box2djs/* linguist-vendored Extensions/Physics2Behavior/box2d.js linguist-vendored Extensions/BBText/pixi-multistyle-text/* linguist-vendored Extensions/P2P/A_peer.js linguist-vendored +Extensions/Multiplayer/peer.js linguist-vendored Extensions/Shopify/shopify-buy.umd.polyfilled.min.js linguist-vendored Extensions/TileMap/pako/* linguist-vendored Extensions/TileMap/pixi-tilemap/* linguist-vendored diff --git a/GDJS/scripts/lib/runtime-files-list.js b/GDJS/scripts/lib/runtime-files-list.js index 6679c1be55..c82e47ee5a 100644 --- a/GDJS/scripts/lib/runtime-files-list.js +++ b/GDJS/scripts/lib/runtime-files-list.js @@ -9,7 +9,17 @@ const extensionsRuntimePath = path.join(gdevelopRootPath, 'Extensions'); const gdjsRuntimePath = path.join(gdjsRootPath, 'Runtime'); // The extensions to be included in the bundled Runtime (will be built with esbuild or copied). -const allowedExtensions = ['.js', '.ts', '.tsx', '.html', '.json', '.xml', '.map', '.wasm', '.txt']; +const allowedExtensions = [ + '.js', + '.ts', + '.tsx', + '.html', + '.json', + '.xml', + '.map', + '.wasm', + '.txt', +]; // These extensions will be built with esbuild (the other will be copied). const transformIncludedExtensions = ['.js', '.ts', '.tsx']; @@ -40,6 +50,7 @@ const untransformedPaths = [ 'Extensions/DialogueTree/bondage.js/dist', 'Extensions/Effects/pixi-filters', 'Extensions/P2P/A_peer.js', + 'Extensions/Multiplayer/peer.js', 'Extensions/ParticleSystem/pixi-particles-pixi-renderer.min.js', 'Extensions/Physics2Behavior/box2d.js', 'Extensions/PhysicsBehavior/box2djs', diff --git a/tsconfig.json b/tsconfig.json index 28fac94661..15db1276ce 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -49,6 +49,7 @@ "Extensions/Effects/pixi-filters/filter-alpha.js", "SharedLibs/TileMapHelper/**/*", "Extensions/Spine/pixi-spine/pixi-spine.js", - "Extensions/P2P/A_peer.js" + "Extensions/P2P/A_peer.js", + "Extensions/Multiplayer/peer.js" ] }