Skip to content

[test] Add initial vite bundler testing. NFC - #23421

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:vite_testing
Jan 16, 2025
Merged

sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:vite_testing

Conversation

@sbc100

@sbc100 sbc100 commented Jan 15, 2025

Copy link
Copy Markdown
Collaborator

This is similar to what we already do for webpack.

By having such tests here the emscripten repo we can better defend ourselves against future breakages that effect vite users (e.g. #22394).

Fixes: #23048

@sbc100 sbc100 changed the title [test] Add vite bundler testing. NFC [test] Add initial vite bundler testing. NFC Jan 15, 2025
Comment thread test/common.py Resolved
This is similar to what we already do for webpack.

By having such tests here the emscripten repo we can better defend
ourselves against future breakages that effect vite users (e.g. emscripten-core#22394).

Fixes: emscripten-core#23048
Comment thread test/test_browser.py
def test_vite(self):
shutil.copytree(test_file('vite'), 'vite')
with common.chdir('vite'):
self.compile_btest('hello_world.c', ['-sEXPORT_ES6', '-sEXIT_RUNTIME', '-sMODULARIZE', '-o', 'hello.mjs'])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to use MODULARIZE=instance here since that's probably more similar to what vite users are using?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the first of (hopefully many) different tests. I'm not sure I'd want to use -sMODULARIZE=instance for this initial smoketest since its still experimental.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The next test I plan to add is one that uses threads so we can confirm that #22394 really is fixed.

@sbc100
sbc100 requested review from brendandahl and dschuff January 16, 2025 01:28
@sbc100
sbc100 enabled auto-merge (squash) January 16, 2025 17:59
@sbc100
sbc100 merged commit 7e37224 into emscripten-core:main Jan 16, 2025
@sbc100
sbc100 deleted the vite_testing branch January 16, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration tests with Vite bundler

4 participants