File tree Expand file tree Collapse file tree 6 files changed +249
-249
lines changed
examples/rspack-latest/src Expand file tree Collapse file tree 6 files changed +249
-249
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ describe('rspack', () => {
9
9
'run rspack build' ,
10
10
async ( ) => {
11
11
const compiler = rspack ( config ) ;
12
- return new Promise ( resolve =>
13
- compiler . run ( error => {
12
+ return new Promise ( ( resolve ) =>
13
+ compiler . run ( ( error ) => {
14
14
console . error ( error ) ;
15
15
resolve ( ) ;
16
16
} ) ,
Original file line number Diff line number Diff line change 1
- import { useState } from " react" ;
2
- import reactLogo from " ./assets/react.svg" ;
3
- import " ./App.css" ;
1
+ import { useState } from ' react' ;
2
+ import reactLogo from ' ./assets/react.svg' ;
3
+ import ' ./App.css' ;
4
4
5
5
function App ( ) {
6
- const [ count , setCount ] = useState ( 0 ) ;
6
+ const [ count , setCount ] = useState ( 0 ) ;
7
7
8
- return (
9
- < div className = "App" >
10
- < div >
11
- < a href = "https://reactjs.org" target = "_blank" rel = "noreferrer" >
12
- < img src = { reactLogo } className = "logo react" alt = "React logo" />
13
- </ a >
14
- </ div >
15
- < h1 > Rspack + React + TypeScript</ h1 >
16
- < div className = "card" >
17
- < button type = "button" onClick = { ( ) => setCount ( count => count + 1 ) } >
18
- count is { count }
19
- </ button >
20
- < p >
21
- Edit < code > src/App.tsx</ code > and save to test HMR
22
- </ p >
23
- </ div >
24
- < p className = "read-the-docs" >
25
- Click on the Rspack and React logos to learn more
26
- </ p >
27
- </ div >
28
- ) ;
8
+ return (
9
+ < div className = "App" >
10
+ < div >
11
+ < a href = "https://reactjs.org" target = "_blank" rel = "noreferrer" >
12
+ < img src = { reactLogo } className = "logo react" alt = "React logo" />
13
+ </ a >
14
+ </ div >
15
+ < h1 > Rspack + React + TypeScript</ h1 >
16
+ < div className = "card" >
17
+ < button type = "button" onClick = { ( ) => setCount ( ( count ) => count + 1 ) } >
18
+ count is { count }
19
+ </ button >
20
+ < p >
21
+ Edit < code > src/App.tsx</ code > and save to test HMR
22
+ </ p >
23
+ </ div >
24
+ < p className = "read-the-docs" >
25
+ Click on the Rspack and React logos to learn more
26
+ </ p >
27
+ </ div >
28
+ ) ;
29
29
}
30
30
31
31
export default App ;
Original file line number Diff line number Diff line change 1
- import React from " react" ;
2
- import ReactDOM from " react-dom/client" ;
3
- import App from " ./App.tsx" ;
4
- import " ./index.css" ;
1
+ import React from ' react' ;
2
+ import ReactDOM from ' react-dom/client' ;
3
+ import App from ' ./App.tsx' ;
4
+ import ' ./index.css' ;
5
5
6
- ReactDOM . createRoot ( document . getElementById ( " root" ) as HTMLElement ) . render (
7
- < React . StrictMode >
8
- < App />
9
- </ React . StrictMode >
6
+ ReactDOM . createRoot ( document . getElementById ( ' root' ) as HTMLElement ) . render (
7
+ < React . StrictMode >
8
+ < App />
9
+ </ React . StrictMode > ,
10
10
) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments