@reactunity/scripts 0.14.1 → 0.15.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/README.md CHANGED
@@ -27,11 +27,14 @@ Environment variables of CRA can be used with React Unity. However, there are so
27
27
  - `GENERATE_SOURCEMAP` - `false` by default.
28
28
  - `FAST_REFRESH` - This can be set to `false` to disable `react-refresh` if you are having problems with hot reload
29
29
  - `IMAGE_INLINE_SIZE_LIMIT` - `0` by default. Because non-inlined images will be faster in Unity. However, if users still want to inline images, they should increase this limit.
30
+ - `JSX_IMPORT_SOURCE` - Can be used to allow some custom JSX transformations. For example, set this variable to `@emotion/react` for Emotion.
30
31
 
31
32
  Environment variables can also be defined by having `.env`, `.env.local`, `.env.<development|production>` in project folder.
32
33
 
33
34
  Custom environment variables are also possible as in [CRA](https://create-react-app.dev/docs/adding-custom-environment-variables).
34
35
 
36
+ `.babelrc` can be used to modify some Babel options.
37
+
35
38
  ## Multiple Entry Points
36
39
 
37
40
  In addition to `src/index` file, there can be other entry points. Every file under `src/entry/` folder will be detected and configured as an entry point. For example, if there is a file `src/entry/menu.tsx`, Webpack will detect that and create an entrypoint named `menu` with output `menu.js` in addition to the default entrypoint `index.js`.
@@ -25,7 +25,7 @@
25
25
  <main>
26
26
  <p class="fs-5 col-md-8">
27
27
  Congratulations on starting your ReactUnity project. You can now test your app inside Unity by setting the
28
- <code>DevServer</code> property of <code>ReactUnityUGUI</code> or <code>ReactUnityUIToolkit</code> components to
28
+ <code>DevServer</code> property of <code>ReactRendererUGUI</code> or <code>ReactRendererUIToolkit</code> components to
29
29
  the address of this page.
30
30
  </p>
31
31
 
@@ -61,7 +61,7 @@
61
61
  <h4>2 - Use a custom previewer</h4>
62
62
 
63
63
  <p class="fs-5 col-md-8">
64
- To do this, you need to build a scene in Unity with <code>ReactUnityUGUI</code> component added. The
64
+ To do this, you need to build a scene in Unity with <code>ReactRendererUGUI</code> component added. The
65
65
  <code>Type</code> property must be set to <code>Url</code> and <code>Source Path</code> property must be set to
66
66
  <code>/index.js</code>.
67
67
 
@@ -325,6 +325,9 @@ const baseConfigFactory = function (webpackEnv) {
325
325
  // Allows replacing react-dom with @reactunity/renderer to support some functionality like `unstable_batchedUpdates`
326
326
  'react-dom': '@reactunity/renderer',
327
327
 
328
+ // Replaces react-unity-webgl with @reactunity/renderer/webgl-compat to support its functionality
329
+ 'react-unity-webgl': '@reactunity/renderer/webgl-compat',
330
+
328
331
  ...(modules.webpackAliases || {}),
329
332
  },
330
333
  plugins: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactunity/scripts",
3
- "version": "0.14.1",
3
+ "version": "0.15.0",
4
4
  "description": "Configuration and scripts for React Unity.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,6 +43,7 @@
43
43
  ]
44
44
  }
45
45
  },
46
+ "tsconfig": "./tsconfig.json",
46
47
  "dependencies": {
47
48
  "@babel/core": "^7.20.12",
48
49
  "@babel/eslint-parser": "^7.19.1",
@@ -52,7 +53,7 @@
52
53
  "@types/webpack-env": "^1.18.0",
53
54
  "@typescript-eslint/eslint-plugin": "^5.52.0",
54
55
  "@typescript-eslint/parser": "^5.52.0",
55
- "babel-jest": "^29.4.2",
56
+ "babel-jest": "^29.4.3",
56
57
  "babel-loader": "^9.1.2",
57
58
  "babel-plugin-named-asset-import": "^0.3.8",
58
59
  "babel-preset-react-app": "^10.0.1",
@@ -68,13 +69,13 @@
68
69
  "eslint-plugin-jest": "^27.2.1",
69
70
  "eslint-plugin-react": "^7.32.2",
70
71
  "eslint-plugin-react-hooks": "^4.6.0",
71
- "eslint-plugin-testing-library": "^5.10.1",
72
+ "eslint-plugin-testing-library": "^5.10.2",
72
73
  "eslint-webpack-plugin": "^4.0.0",
73
74
  "file-loader": "^6.2.0",
74
75
  "fs-extra": "^11.1.0",
75
76
  "identity-obj-proxy": "^3.0.0",
76
- "jest": "^29.4.2",
77
- "jest-resolve": "^29.4.2",
77
+ "jest": "^29.4.3",
78
+ "jest-resolve": "^29.4.3",
78
79
  "jest-watch-typeahead": "^2.2.2",
79
80
  "mini-css-extract-plugin": "^2.7.2",
80
81
  "null-loader": "^4.0.1",
@@ -87,12 +88,12 @@
87
88
  "react-refresh": "^0.14.0",
88
89
  "resolve": "^1.22.1",
89
90
  "resolve-url-loader": "^5.0.0",
90
- "sass": "^1.58.0",
91
+ "sass": "^1.58.3",
91
92
  "sass-loader": "^13.2.0",
92
93
  "semver": "^7.3.8",
93
94
  "source-map-loader": "^4.0.1",
94
95
  "style-loader": "^3.3.1",
95
- "tailwindcss": "^3.2.6",
96
+ "tailwindcss": "^3.2.7",
96
97
  "terser-webpack-plugin": "^5.3.6",
97
98
  "url-loader": "^4.1.1",
98
99
  "webpack": "^5.75.0",
@@ -107,7 +108,7 @@
107
108
  },
108
109
  "peerDependencies": {
109
110
  "@reactunity/previewer": "*",
110
- "@reactunity/renderer": "^0.14.0",
111
+ "@reactunity/renderer": "^0.15.0",
111
112
  "react": "^18.0.0",
112
113
  "typescript": "^4.9.5"
113
114
  },