diff --git a/.gitignore b/.gitignore
index 6214c43..410125c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -78,3 +78,7 @@ typings/
# DynamoDB Local files
.dynamodb/
+
+# ----
+dist
+**/.tmp
diff --git a/common/consts.ts b/common/consts.ts
new file mode 100644
index 0000000..e69de29
diff --git a/main/index.ts b/main/index.ts
new file mode 100644
index 0000000..e69de29
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..f305d68
--- /dev/null
+++ b/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "electron-react-vite",
+ "version": "1.0.0",
+ "description": "Electron React Vite boilerplate.",
+ "main": "dist/main/index.js",
+ "author": "草鞋没号 <308487730@qq.com>",
+ "license": "MIT"
+}
diff --git a/preload/index.main.ts b/preload/index.main.ts
new file mode 100644
index 0000000..e69de29
diff --git a/preload/index.win1.ts b/preload/index.win1.ts
new file mode 100644
index 0000000..e69de29
diff --git a/react-ts/.gitignore b/react-ts/.gitignore
new file mode 100644
index 0000000..d451ff1
--- /dev/null
+++ b/react-ts/.gitignore
@@ -0,0 +1,5 @@
+node_modules
+.DS_Store
+dist
+dist-ssr
+*.local
diff --git a/react-ts/index.html b/react-ts/index.html
new file mode 100644
index 0000000..38f3861
--- /dev/null
+++ b/react-ts/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Vite App
+
+
+
+
+
+
diff --git a/react-ts/package.json b/react-ts/package.json
new file mode 100644
index 0000000..78487a6
--- /dev/null
+++ b/react-ts/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "react-ts",
+ "version": "0.0.0",
+ "scripts": {
+ "dev": "vite",
+ "build": "tsc && vite build",
+ "serve": "vite preview"
+ },
+ "dependencies": {
+ "react": "^17.0.0",
+ "react-dom": "^17.0.0"
+ },
+ "devDependencies": {
+ "@types/react": "^17.0.0",
+ "@types/react-dom": "^17.0.0",
+ "@vitejs/plugin-react": "^1.0.0",
+ "typescript": "^4.3.2",
+ "vite": "^2.6.4"
+ }
+}
\ No newline at end of file
diff --git a/react-ts/src/App.css b/react-ts/src/App.css
new file mode 100644
index 0000000..8da3fde
--- /dev/null
+++ b/react-ts/src/App.css
@@ -0,0 +1,42 @@
+.App {
+ text-align: center;
+}
+
+.App-logo {
+ height: 40vmin;
+ pointer-events: none;
+}
+
+@media (prefers-reduced-motion: no-preference) {
+ .App-logo {
+ animation: App-logo-spin infinite 20s linear;
+ }
+}
+
+.App-header {
+ background-color: #282c34;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ font-size: calc(10px + 2vmin);
+ color: white;
+}
+
+.App-link {
+ color: #61dafb;
+}
+
+@keyframes App-logo-spin {
+ from {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(360deg);
+ }
+}
+
+button {
+ font-size: calc(10px + 2vmin);
+}
diff --git a/react-ts/src/App.tsx b/react-ts/src/App.tsx
new file mode 100644
index 0000000..3d9bd71
--- /dev/null
+++ b/react-ts/src/App.tsx
@@ -0,0 +1,45 @@
+import { useState } from 'react'
+import logo from './logo.svg'
+import './App.css'
+
+function App() {
+ const [count, setCount] = useState(0)
+
+ return (
+
+
+
+ Hello Vite + React!
+
+
+
+
+ Edit App.tsx
and save to test HMR updates.
+
+
+
+ Learn React
+
+ {' | '}
+
+ Vite Docs
+
+
+
+
+ )
+}
+
+export default App
diff --git a/react-ts/src/favicon.svg b/react-ts/src/favicon.svg
new file mode 100644
index 0000000..de4aedd
--- /dev/null
+++ b/react-ts/src/favicon.svg
@@ -0,0 +1,15 @@
+
diff --git a/react-ts/src/index.css b/react-ts/src/index.css
new file mode 100644
index 0000000..ec2585e
--- /dev/null
+++ b/react-ts/src/index.css
@@ -0,0 +1,13 @@
+body {
+ margin: 0;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
+ sans-serif;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+code {
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
+ monospace;
+}
diff --git a/react-ts/src/logo.svg b/react-ts/src/logo.svg
new file mode 100644
index 0000000..6b60c10
--- /dev/null
+++ b/react-ts/src/logo.svg
@@ -0,0 +1,7 @@
+
diff --git a/react-ts/src/main.tsx b/react-ts/src/main.tsx
new file mode 100644
index 0000000..606a3cf
--- /dev/null
+++ b/react-ts/src/main.tsx
@@ -0,0 +1,11 @@
+import React from 'react'
+import ReactDOM from 'react-dom'
+import './index.css'
+import App from './App'
+
+ReactDOM.render(
+
+
+ ,
+ document.getElementById('root')
+)
diff --git a/react-ts/src/vite-env.d.ts b/react-ts/src/vite-env.d.ts
new file mode 100644
index 0000000..11f02fe
--- /dev/null
+++ b/react-ts/src/vite-env.d.ts
@@ -0,0 +1 @@
+///
diff --git a/react-ts/tsconfig.json b/react-ts/tsconfig.json
new file mode 100644
index 0000000..9f83659
--- /dev/null
+++ b/react-ts/tsconfig.json
@@ -0,0 +1,20 @@
+{
+ "compilerOptions": {
+ "target": "ESNext",
+ "useDefineForClassFields": true,
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
+ "allowJs": false,
+ "skipLibCheck": false,
+ "esModuleInterop": false,
+ "allowSyntheticDefaultImports": true,
+ "strict": true,
+ "forceConsistentCasingInFileNames": true,
+ "module": "ESNext",
+ "moduleResolution": "Node",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "noEmit": true,
+ "jsx": "react-jsx"
+ },
+ "include": ["./src"]
+}
diff --git a/react-ts/vite.config.ts b/react-ts/vite.config.ts
new file mode 100644
index 0000000..b1b5f91
--- /dev/null
+++ b/react-ts/vite.config.ts
@@ -0,0 +1,7 @@
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+
+// https://vitejs.dev/config/
+export default defineConfig({
+ plugins: [react()]
+})
diff --git a/scripts/build-main.ts b/scripts/build-main.ts
new file mode 100644
index 0000000..e69de29
diff --git a/scripts/build-preload.ts b/scripts/build-preload.ts
new file mode 100644
index 0000000..e69de29
diff --git a/scripts/rollup.config.ts b/scripts/rollup.config.ts
new file mode 100644
index 0000000..e69de29