-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Vite instead or React tools, fix vulnerabilities.
Also: rename .JS files to .JSX; change require to import, as require does not work in Vite
- Loading branch information
1 parent
54e539c
commit 0e21a7f
Showing
42 changed files
with
8,992 additions
and
131,172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,6 @@ export default defineConfig({ | |
port: 3000 | ||
}, | ||
build: { | ||
outDir: "../build" | ||
outDir: "build" | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28,166 changes: 1,910 additions & 26,256 deletions
28,166
public_html/examples/react/03-class-components/package-lock.json
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 8 additions & 24 deletions
32
public_html/examples/react/03-class-components/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,16 @@ | ||
{ | ||
"name": "class-components", | ||
"version": "0.1.0", | ||
"version": "2.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"react": "18.0.0", | ||
"react-dom": "18.0.0", | ||
"react-scripts": "5.0.1", | ||
"webpack": "^5.93.0" | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"vite": "^5.3.4", | ||
"@vitejs/plugin-react": "^4.3.1" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"react-app" | ||
] | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
"start": "vite", | ||
"build": "vite build", | ||
"serve": "vite preview" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
public_html/examples/react/03-class-components/vite.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {defineConfig} from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
server: { | ||
port: 3000 | ||
}, | ||
build: { | ||
outDir: "build" | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.