File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "description" : " " ,
55 "main" : " index.js" ,
66 "scripts" : {
7- "test" : " echo \" Error: no test specified\" && exit 1"
7+ "dev" : " rsbuild dev" ,
8+ "build" : " rsbuild build" ,
9+ "preview" : " rsbuild preview"
810 },
911 "keywords" : [],
1012 "author" : " " ,
1113 "license" : " ISC" ,
12- "packageManager" : " pnpm@10.4.1"
14+ "packageManager" : " pnpm@10.4.1" ,
15+ "dependencies" : {
16+ "react" : " ^18.2.0" ,
17+ "react-dom" : " ^18.2.0"
18+ },
19+ "devDependencies" : {
20+ "@babel/core" : " ^7.24.0" ,
21+ "@babel/preset-env" : " ^7.24.0" ,
22+ "@babel/preset-react" : " ^7.23.3" ,
23+ "@babel/preset-typescript" : " ^7.24.0" ,
24+ "@rsbuild/core" : " ^1.3.15" ,
25+ "@rsbuild/plugin-babel" : " ^1.0.5" ,
26+ "@types/react" : " ^18.2.0" ,
27+ "@types/react-dom" : " ^18.2.0" ,
28+ "typescript" : " ^5.0.0" ,
29+ "@types/node" : " ^20.0.0"
30+ }
1331}
Original file line number Diff line number Diff line change 1+ <!doctype html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 " />
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6+ < title > EzMonitor-Web</ title >
7+ </ head >
8+ < body >
9+ < div id ="root "> </ div >
10+ </ body >
11+ </ html >
Original file line number Diff line number Diff line change 1+ import { defineConfig } from '@rsbuild/core' ;
2+ import { pluginBabel } from '@rsbuild/plugin-babel' ;
3+
4+ export default defineConfig ( {
5+ source : {
6+ entry : {
7+ index : './src/index.tsx' ,
8+ } ,
9+ } ,
10+ html : {
11+ template : './public/index.html' ,
12+ } ,
13+ plugins : [
14+ pluginBabel ( {
15+ include : / \. ( j s | j s x | t s | t s x ) $ / ,
16+ exclude : / n o d e _ m o d u l e s / ,
17+ babelLoaderOptions : {
18+ presets : [
19+ [ '@babel/preset-react' , {
20+ runtime : 'automatic' ,
21+ importSource : 'react'
22+ } ] ,
23+ '@babel/preset-env' ,
24+ '@babel/preset-typescript'
25+ ]
26+ }
27+ } )
28+ ]
29+ } ) ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { createRoot } from 'react-dom/client' ;
3+
4+ function App ( ) {
5+ return < h1 > Hello React 18!</ h1 > ;
6+ }
7+
8+ createRoot ( document . getElementById ( 'root' ) ! ) . render (
9+ < React . StrictMode >
10+ < App />
11+ </ React . StrictMode > ,
12+ ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "target" : " ESNext" ,
4+ "module" : " ESNext" ,
5+ "jsx" : " react-jsx" ,
6+ "strict" : true ,
7+ "moduleResolution" : " node" ,
8+ "esModuleInterop" : true ,
9+ "skipLibCheck" : true ,
10+ "forceConsistentCasingInFileNames" : true
11+ },
12+ "include" : [" src" ]
13+ }
You can’t perform that action at this time.
0 commit comments