If you work with Tauri you would know that this repository is no longer needed. Tuari supplies templates and examples to get started with your favourite front-ends. This was not so much the case in the early days of Tauri, and in any case, this was built without tooling like vite.
- Windows
- MacOS
- Linux
powered by WebView with Tauri!
This is a simple setup to get started with React and Tauri in Typescript. If you fancy Javascript, you can find it at ReacTaur_JS.
The project was bootstrapped with Create React App using the typescript template, thus if you are familiar with most React.ts apps, you should have a foothold.
Please note that the initial build and packaging can take very long. After the initial build and packaging, things should move quicker.
Ensure that you have visited Tauri's website and installed the following:
- System Dependencies
- Node.js Runtime and Package Manager
- Rustc and Cargo Package Manager
- WebView2 (Windows) or WSL Version 1 & 2 (Linux)
If you have met all the dependancies for your operating system and have successfully cloned the Git repo, cd into the directory and run "yarn install" or "npm install" to install dependancies.
In the project directory, you can run:
(React and Tauri) Runs React and Tauri concurrently in development mode. Open http://localhost:3001 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
(React) Runs React in development mode. Open http://localhost:3001 to view it in the browser.
(Tauri) Runs Tauri in development mode on http://localhost:3001.
(React) 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.
This does NOT include Tauri!
(React and Tauri) Runs the React build command then builds the Tauri app with the contents found in the './build/' folder. This produces the 'target' folder in './src-tauri/', which contains both the executable an installer.
(Tauri) Builds the Tauri app with the contents found in the './build/' folder. This produces the 'target' folder in './src-tauri/', which contains both the executable an installer.
(Tauri) Interfaces with the Tauri CLI (@tauri-apps/cli package). See the CLI section for more information.
(React) Launches the test runner in the interactive watch mode. See the section about running tests for more information.
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
Check out Tauri's dedicated list on Tauri Patterns. It is intuitive and explains the execution process of the app you might want to build.
You can learn more about Tauri and the awesome tool they are developing at their website
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify