@@ -5593,21 +5593,26 @@ def test_webpack(self, es6):
5593
5593
outfile = 'src/hello.js'
5594
5594
self .compile_btest ('hello_world.c' , ['-sEXIT_RUNTIME' , '-sMODULARIZE' , '-sENVIRONMENT=web,worker' , '-o' , outfile ])
5595
5595
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.
5596
5598
shutil .copy ('src/hello.wasm' , 'dist/' )
5597
5599
self .run_browser ('dist/index.html' , '/report_result?exit:0' )
5598
5600
5599
5601
@also_with_threads
5600
5602
def test_vite (self ):
5601
5603
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' ])
5603
5605
self .run_process (shared .get_npm_cmd ('vite' ) + ['build' ])
5604
5606
self .run_browser ('dist/index.html' , '/report_result?exit:0' )
5605
5607
5606
5608
@also_with_threads
5607
5609
def test_rollup (self ):
5608
5610
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' ])
5610
5612
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/' )
5611
5616
self .run_browser ('index.html' , '/report_result?exit:0' )
5612
5617
5613
5618
0 commit comments