@dcl-regenesislabs/bevy-explorer-web 0.1.0-18286584387.commit-ebe570a → 0.1.0-18286955946.commit-d39959b
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/index.html +1 -1
- package/package.json +2 -2
- package/pkg/webgpu_build_bg.wasm +0 -0
- package/scripts/prebuild.js +17 -0
package/index.html
CHANGED
|
@@ -129,6 +129,6 @@
|
|
|
129
129
|
</div>
|
|
130
130
|
<script src="https://cdn.jsdelivr.net/npm/livekit-client/dist/livekit-client.umd.min.js"></script>
|
|
131
131
|
<script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>
|
|
132
|
-
<script type="module" src="main.js"></script>
|
|
132
|
+
<script type="module" src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0/main.js"></script>
|
|
133
133
|
</body>
|
|
134
134
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl-regenesislabs/bevy-explorer-web",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-18286955946.commit-d39959b",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"postinstall": "node ./scripts/prebuild.js"
|
|
6
6
|
},
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"url": "git+https://github.com/decentraland/bevy-explorer.git"
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0",
|
|
12
|
-
"commit": "
|
|
12
|
+
"commit": "d39959bf9982c57a9684689bb627b59f6b356f64"
|
|
13
13
|
}
|
package/pkg/webgpu_build_bg.wasm
CHANGED
|
Binary file
|
package/scripts/prebuild.js
CHANGED
|
@@ -27,6 +27,23 @@ fs.writeFileSync(
|
|
|
27
27
|
|
|
28
28
|
fs.writeFileSync("./package.json", JSON.stringify(packageJson, null, 2));
|
|
29
29
|
|
|
30
|
+
// Update HTML file to include PUBLIC_URL in script src
|
|
31
|
+
const htmlPath = "index.html";
|
|
32
|
+
if (fs.existsSync(htmlPath)) {
|
|
33
|
+
let htmlContent = fs.readFileSync(htmlPath).toString();
|
|
34
|
+
const publicUrl = ENV_CONTENT["PUBLIC_URL"];
|
|
35
|
+
const scriptPath = publicUrl ? `${publicUrl}/main.js` : "main.js";
|
|
36
|
+
|
|
37
|
+
// Replace the main.js script src
|
|
38
|
+
htmlContent = htmlContent.replace(
|
|
39
|
+
/<script type="module" src="main\.js"><\/script>/,
|
|
40
|
+
`<script type="module" src="${scriptPath}"></script>`
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
fs.writeFileSync(htmlPath, htmlContent);
|
|
44
|
+
console.log(`Updated ${htmlPath} with script path: ${scriptPath}`);
|
|
45
|
+
}
|
|
46
|
+
|
|
30
47
|
function getPublicUrls() {
|
|
31
48
|
console.log('Get public urls')
|
|
32
49
|
if (!process.env.GEN_STATIC_LOCAL) {
|