
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
@reactunity/scripts
Advanced tools
This package includes scripts and configuration used by React Unity.
This project is a fork of Create React App (CRA). Same options, conventions, and environment variables can be used. You can also check the documentation of CRA to get more information.
npm i @reactunity/scripts
react-unity-scripts start - Start the dev server with Hot Module Replacement (HMR)react-unity-scripts build - Create the production ready buildreact-unity-scripts start --test - Start the test server (entry file will be test.ts instead of index.ts)Environment variables of CRA can be used with React Unity. However, there are some differences:
FILENAME - Name of the generated javascript file. index.js by default.BUILD_PATH - Path to the generated output. Relative to the project. ../Assets/Resources/react by default.GENERATE_SOURCEMAP - false by default.FASH_REFRESH - This experimental feature can be turned on. false by default.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.Environment variables can also be defined by having .env, .env.local, .env.<development|production> in project folder.
Custom environment variables are also possible as in CRA.
When dev server is started with the start script, a web server is launched at the selected port (e.g. http://localhost:3000). This server serves the javascript and asset files that are used by ReactUnity. If you visit this link in browser, you will see a prebuilt Unity application that renders your React code. This application can be used to quickly test the React code without even launching Unity. It also reacts to the changes in code by utilizing HMR.
Note that this web inspector has very limited capabilities. However it is a useful tool for when starting a new ReactUnity project. As an advanced feature, you can override the web inspector by placing your custom web inspector in public folder under your React project.
FAQs
Configuration and scripts for React Unity.
The npm package @reactunity/scripts receives a total of 7 weekly downloads. As such, @reactunity/scripts popularity was classified as not popular.
We found that @reactunity/scripts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.