forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some testing initial rollup testing. NFC (emscripten-core#23439)
I think we we getting some indirect testing already via the vite tests I added but this tests rollup directly, which will be useful once we start developing the planning rollup plugin.
- Loading branch information
Showing
6 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<html> | ||
<body> | ||
<hr><div id='output'></div><hr> | ||
<script type="module" src="./bundle.mjs"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var params = { | ||
print: (function() { | ||
var element = document.getElementById('output'); | ||
return function(text) { | ||
console.log(text); | ||
element.innerHTML += text.replace('\n', '<br>', 'g') + '<br>'; | ||
}; | ||
})(), | ||
canvas: document.getElementById('canvas'), | ||
}; | ||
|
||
params.print("testing.."); | ||
|
||
import Module from './hello.mjs'; | ||
Module(params).then((instance) => { | ||
console.log('loaded'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default { | ||
input: 'index.mjs', | ||
output: { | ||
file: 'bundle.mjs', | ||
format: 'es' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters