mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Compile <script> tags as TypeScript rather than JS
This commit is contained in:
parent
8685506174
commit
5f52901fdf
3 changed files with 4 additions and 3 deletions
|
@ -102,7 +102,7 @@ export class Metadata {
|
|||
let i = 0,
|
||||
pathname = metadata.mockURL.pathname;
|
||||
while (i < metadata.hoisted.length) {
|
||||
yield `${pathname}?astro&type=script&index=${i}`;
|
||||
yield `${pathname}?astro&type=script&index=${i}&lang.ts`;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -316,7 +316,6 @@ async function handleRequest(
|
|||
return await writeSSRResult(result, res, statusCode);
|
||||
}
|
||||
} catch (_err) {
|
||||
debugger;
|
||||
const err = fixViteErrorMessage(createSafeError(_err), viteServer);
|
||||
error(logging, null, msg.formatErrorMessage(err));
|
||||
handle500Response(viteServer, origin, req, res, err);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
<script>
|
||||
console.log('some content here.');
|
||||
type Foo = 'bar';
|
||||
const thing: Foo = 'bar';
|
||||
console.log('some content here.', thing);
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue