mirror of
https://github.com/hanzoai/swc.git
synced 2026-10-30 19:42:53 +00:00
36 lines
574 B
HTML
36 lines
574 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Document</title>
|
|
</head>
|
|
<body>
|
|
|
|
<div>Script:</div>
|
|
<script>
|
|
/* Should mangle top level stuff */
|
|
var topLevel = function test() {
|
|
let foo = "bar";
|
|
|
|
if (foo) {
|
|
foo += "baz";
|
|
}
|
|
|
|
console.log(foo);
|
|
};
|
|
</script>
|
|
|
|
<div>Module:</div>
|
|
<script type="module">
|
|
/* Should mangle top level stuff */
|
|
var topLevel = function test() {
|
|
let foo = "bar";
|
|
|
|
if (foo) {
|
|
foo += "baz";
|
|
}
|
|
|
|
console.log(foo);
|
|
};
|
|
</script>
|
|
</body>
|
|
</html> |