@reactunity/scripts 0.23.2 → 0.24.0
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/config/public/index.html +15 -9
- package/package.json +12 -12
package/config/public/index.html
CHANGED
|
@@ -113,16 +113,22 @@
|
|
|
113
113
|
<script>
|
|
114
114
|
/*
|
|
115
115
|
* The Unity build lives on reactunity.github.io rather than in an npm package: it is
|
|
116
|
-
* ~
|
|
117
|
-
*
|
|
118
|
-
*
|
|
116
|
+
* ~26 MB, and shipping it as a dependency meant every install paid for it. GitHub Pages
|
|
117
|
+
* sends `Access-Control-Allow-Origin: *`, so a cross-origin fetch from this dev server
|
|
118
|
+
* is fine.
|
|
119
|
+
*
|
|
120
|
+
* `.unityweb` is Unity's name for "gzipped, and the loader inflates it itself". Pages
|
|
121
|
+
* cannot be told to send `Content-Encoding`, so the alternative is shipping the files
|
|
122
|
+
* raw, which is three times the download. It costs streaming compilation.
|
|
119
123
|
*
|
|
120
124
|
* The version is part of the path on purpose. Unity's loader, framework and wasm are
|
|
121
125
|
* built as a set and are not interchangeable, so each build gets its own directory and
|
|
122
|
-
* nothing is ever overwritten.
|
|
123
|
-
*
|
|
126
|
+
* nothing is ever overwritten. It names the release the build ships in, not the day it
|
|
127
|
+
* was made. Publishing a new previewer build means adding a directory on that branch and
|
|
128
|
+
* bumping the version here -- in that order, or every dev server in the wild asks for a
|
|
129
|
+
* directory that is not there yet.
|
|
124
130
|
*/
|
|
125
|
-
var PREVIEWER_VERSION = '0.
|
|
131
|
+
var PREVIEWER_VERSION = '0.24.0';
|
|
126
132
|
var PREVIEWER_BASE = 'https://reactunity.github.io/Unity/previewer/' + PREVIEWER_VERSION + '/Build/';
|
|
127
133
|
|
|
128
134
|
function fail() {
|
|
@@ -149,9 +155,9 @@
|
|
|
149
155
|
if (typeof createUnityInstance !== 'function') return fail();
|
|
150
156
|
|
|
151
157
|
createUnityInstance(document.getElementById('unity-canvas'), {
|
|
152
|
-
dataUrl: PREVIEWER_BASE + 'Previewer.data',
|
|
153
|
-
frameworkUrl: PREVIEWER_BASE + 'Previewer.framework.js',
|
|
154
|
-
codeUrl: PREVIEWER_BASE + 'Previewer.wasm',
|
|
158
|
+
dataUrl: PREVIEWER_BASE + 'Previewer.data.unityweb',
|
|
159
|
+
frameworkUrl: PREVIEWER_BASE + 'Previewer.framework.js.unityweb',
|
|
160
|
+
codeUrl: PREVIEWER_BASE + 'Previewer.wasm.unityweb',
|
|
155
161
|
// Absolute like the rest. Left relative it would resolve against this dev server,
|
|
156
162
|
// which has no StreamingAssets to serve.
|
|
157
163
|
streamingAssetsUrl: PREVIEWER_BASE + '../StreamingAssets',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactunity/scripts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Configuration and scripts for React Unity.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@babel/preset-react": "^8.0.1",
|
|
53
53
|
"@babel/preset-typescript": "^8.0.1",
|
|
54
54
|
"@babel/runtime": "^8.0.0",
|
|
55
|
-
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.
|
|
55
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.3",
|
|
56
56
|
"@svgr/webpack": "^8.1.0",
|
|
57
|
-
"@types/react": "^19.2.
|
|
57
|
+
"@types/react": "^19.2.18",
|
|
58
58
|
"@types/webpack-env": "^1.18.8",
|
|
59
|
-
"babel-jest": "^30.
|
|
59
|
+
"babel-jest": "^30.5.1",
|
|
60
60
|
"babel-loader": "^10.1.1",
|
|
61
61
|
"babel-plugin-macros": "^3.1.0",
|
|
62
62
|
"babel-plugin-named-asset-import": "^0.3.8",
|
|
@@ -64,19 +64,19 @@
|
|
|
64
64
|
"camelcase": "^9.0.0",
|
|
65
65
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
66
66
|
"confusing-browser-globals": "^1.0.11",
|
|
67
|
-
"css-loader": "^7.1.
|
|
67
|
+
"css-loader": "^7.1.5",
|
|
68
68
|
"dotenv": "^17.4.2",
|
|
69
|
-
"dotenv-expand": "^
|
|
69
|
+
"dotenv-expand": "^1000.0.0",
|
|
70
70
|
"file-loader": "^6.2.0",
|
|
71
71
|
"fs-extra": "^11.4.0",
|
|
72
72
|
"identity-obj-proxy": "^3.0.0",
|
|
73
|
-
"jest": "^30.
|
|
74
|
-
"jest-resolve": "^30.
|
|
73
|
+
"jest": "^30.5.1",
|
|
74
|
+
"jest-resolve": "^30.5.1",
|
|
75
75
|
"jest-watch-typeahead": "^3.0.1",
|
|
76
76
|
"jsonc-parser": "^3.3.1",
|
|
77
77
|
"mini-css-extract-plugin": "^2.10.2",
|
|
78
78
|
"null-loader": "^4.0.1",
|
|
79
|
-
"postcss": "^8.5.
|
|
79
|
+
"postcss": "^8.5.26",
|
|
80
80
|
"postcss-loader": "^8.2.1",
|
|
81
81
|
"prompts": "^2.4.2",
|
|
82
82
|
"raw-loader": "^4.0.2",
|
|
@@ -85,15 +85,15 @@
|
|
|
85
85
|
"react-refresh": "^0.18.0",
|
|
86
86
|
"resolve": "^1.22.12",
|
|
87
87
|
"resolve-url-loader": "^5.0.0",
|
|
88
|
-
"sass": "^1.
|
|
89
|
-
"sass-loader": "^17.0.
|
|
88
|
+
"sass": "^1.103.1",
|
|
89
|
+
"sass-loader": "^17.0.1",
|
|
90
90
|
"semver": "^7.8.5",
|
|
91
91
|
"source-map-loader": "^5.0.0",
|
|
92
92
|
"style-loader": "^4.0.0",
|
|
93
93
|
"tailwindcss": "^4.3.3",
|
|
94
94
|
"terser-webpack-plugin": "^5.6.1",
|
|
95
95
|
"url-loader": "^4.1.1",
|
|
96
|
-
"webpack": "^5.
|
|
96
|
+
"webpack": "^5.110.3",
|
|
97
97
|
"webpack-dev-server": "^6.0.0",
|
|
98
98
|
"webpack-manifest-plugin": "^6.0.1"
|
|
99
99
|
},
|