zsc-react-demo v1.0.0
Zegami React Example
This project was bootstrapped with Create React App.
Example of using the standalone client as part of a React App. This react app was build using create-react-app.
Zegami is compiled into the application as with any other external dependency. It is important that the build process doesn't attempt to transform the code - the module should be treated as any other node module, but because it is imported outside of npm this doesn't happen automatically.
Here, this has been achieved as followed:
- Create new app with
create-react-app
- Expose the full configuration with
yarn eject
- Add the
zegami.js
file (commonJs build) into anadditional_modules
directory. - Modify
webpack.config.js
to include the newadditional_modules
directory alongsidenode_modules
for resolving modules
Available Scripts
In the project directory, you can run:
yarn start
Runs the app in the development mode.\ Open http://localhost:8080 to view it in the browser.
The page will reload if you make edits.\ You will also see any lint errors in the console.
yarn build
Builds the app for production to the build
folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\ Your app is ready to be deployed!
See the section about deployment for more information.
2 years ago