(self, args)
| 5566 | }) |
| 5567 | @requires_dev_dependency('webpack') |
| 5568 | def test_webpack(self, args): |
| 5569 | if '-sEXPORT_ES6' in args: |
| 5570 | copytree(test_file('webpack_es6'), '.') |
| 5571 | outfile = 'src/hello.mjs' |
| 5572 | else: |
| 5573 | copytree(test_file('webpack'), '.') |
| 5574 | outfile = 'src/hello.js' |
| 5575 | self.compile_btest('hello_world.c', ['-sEXIT_RUNTIME', '-sMODULARIZE', '-sENVIRONMENT=web', '-o', outfile] + args) |
| 5576 | self.run_process(shared.get_npm_cmd('webpack') + ['--mode=development', '--no-devtool']) |
| 5577 | if not self.is_wasm2js(): |
| 5578 | # Webpack doesn't bundle the wasm file by default so we need to copy it |
| 5579 | # TODO(sbc): Look into plugins that do bundling. |
| 5580 | shutil.copy('src/hello.wasm', 'dist/') |
| 5581 | self.run_browser('dist/index.html', '/report_result?exit:0') |
| 5582 | |
| 5583 | @also_with_pthreads |
| 5584 | @requires_dev_dependency('vite') |
nothing calls this directly
no test coverage detected