Skip to content

Commit

Permalink
chore: remove react-script, use vite (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
alewin authored Oct 26, 2024
1 parent afc0f35 commit 5482f01
Show file tree
Hide file tree
Showing 13 changed files with 5,577 additions and 18,202 deletions.
14 changes: 14 additions & 0 deletions packages/examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/date-fns/1.30.1/date_fns.js"></script>

<title>UseWorker Examples</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
29 changes: 11 additions & 18 deletions packages/examples/package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
{
"name": "@koale/useworker-examples",
"version": "1.0.0",
"private": true,
"dependencies": {
"@koale/useworker": "workspace:^4.0.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.1.2",
"react-scripts": "^3.4.1",
"react-toast-notifications": "^2.4.0"
},
"type": "module",
"scripts": {
"start": "SKIP_PREFLIGHT_CHECK=true react-scripts start",
"build": "SKIP_PREFLIGHT_CHECK=true react-scripts build"
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"browserslist": {
"production": [">0.2%", "not dead", "not op_mini all"],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
"devDependencies": {
"@vitejs/plugin-react": "^4.3.3",
"vite": "^5.4.9"
}
}
Binary file removed packages/examples/public/favicon.ico
Binary file not shown.
48 changes: 0 additions & 48 deletions packages/examples/public/index.html

This file was deleted.

Binary file removed packages/examples/public/logo192.png
Binary file not shown.
Binary file removed packages/examples/public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions packages/examples/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/examples/public/robots.txt

This file was deleted.

File renamed without changes.
5 changes: 0 additions & 5 deletions packages/examples/src/index.js

This file was deleted.

10 changes: 10 additions & 0 deletions packages/examples/src/main.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './style.css'
import App from './App.jsx'

createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</StrictMode>,
)
10 changes: 10 additions & 0 deletions packages/examples/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
plugins: [react()],
root: "src",
build: {
outDir: "../dist",
},
});
Loading

0 comments on commit 5482f01

Please sign in to comment.