@@ -5593,21 +5593,26 @@ def test_webpack(self, es6):
55935593 outfile = 'src/hello.js'
55945594 self .compile_btest ('hello_world.c' , ['-sEXIT_RUNTIME' , '-sMODULARIZE' , '-sENVIRONMENT=web,worker' , '-o' , outfile ])
55955595 self .run_process (shared .get_npm_cmd ('webpack' ) + ['--mode=development' , '--no-devtool' ])
5596+ # Webpack doesn't bundle the wasm file by default so we need to copy it
5597+ # TODO(sbc): Look into plugins that do bundling.
55965598 shutil .copy ('src/hello.wasm' , 'dist/' )
55975599 self .run_browser ('dist/index.html' , '/report_result?exit:0' )
55985600
55995601 @also_with_threads
56005602 def test_vite (self ):
56015603 copytree (test_file ('vite' ), '.' )
5602- self .compile_btest ('hello_world.c' , ['-sEXPORT_ES6' , '- sEXIT_RUNTIME' , '-sMODULARIZE ' , '-sENVIRONMENT=web,worker' , '-o' , 'hello.mjs' ])
5604+ self .compile_btest ('hello_world.c' , ['-sEXIT_RUNTIME' , '-sENVIRONMENT=web,worker' , '-o' , 'hello.mjs' ])
56035605 self .run_process (shared .get_npm_cmd ('vite' ) + ['build' ])
56045606 self .run_browser ('dist/index.html' , '/report_result?exit:0' )
56055607
56065608 @also_with_threads
56075609 def test_rollup (self ):
56085610 copytree (test_file ('rollup' ), '.' )
5609- self .compile_btest ('hello_world.c' , ['-sEXPORT_ES6' , '- sEXIT_RUNTIME' , '-sMODULARIZE ' , '-o' , 'hello.mjs' ])
5611+ self .compile_btest ('hello_world.c' , ['-sEXIT_RUNTIME' , '-o' , 'hello.mjs' ])
56105612 self .run_process (shared .get_npm_cmd ('rollup' ) + ['--config' ])
5613+ # Rollup doesn't bundle the wasm file by default so we need to copy it
5614+ # TODO(sbc): Look into plugins that do bundling.
5615+ shutil .copy ('hello.wasm' , 'dist/' )
56115616 self .run_browser ('index.html' , '/report_result?exit:0' )
56125617
56135618
0 commit comments