File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-scripts-rust" ,
3
- "version" : " 2.0.1 " ,
3
+ "version" : " 2.0.2 " ,
4
4
"description" : " Configuration and scripts for using Rust with Create React App" ,
5
5
"repository" : " thomashorrobin/create-react-app-rust" ,
6
6
"license" : " MIT" ,
Original file line number Diff line number Diff line change 1
1
const execSync = require ( 'child_process' ) . execSync ;
2
2
3
3
module . exports = ( ) => {
4
- execSync (
5
- 'rustc +nightly --target wasm32-unknown-unknown -O --crate-type=cdylib src/lib.rs -o public/app.big.wasm && wasm-gc public/app.big.wasm public/app.wasm'
6
- // 'rustc +nightly --target wasm32-unknown-unknown -O --crate-type=cdylib src/lib.rs -o public/app.big.wasm && wasm-gc public/app.big.wasm public/app.wasm && rm public/app.big.wasm'
7
- ) ;
4
+ try {
5
+ execSync (
6
+ 'rustc +nightly --target wasm32-unknown-unknown -O --crate-type=cdylib src/lib.rs -o public/app.big.wasm && wasm-gc public/app.big.wasm public/app.wasm && rm public/app.big.wasm'
7
+ ) ;
8
+ } catch ( error ) {
9
+ execSync (
10
+ 'rustc +nightly --target wasm32-unknown-unknown -O --crate-type=cdylib src/lib.rs -o public/app.big.wasm && wasm-gc public/app.big.wasm public/app.wasm'
11
+ ) ;
12
+ }
8
13
} ;
You can’t perform that action at this time.
0 commit comments