| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,4 @@ | |||
| 1 | + <script> | ||
| 2 | + type Foo = 'bar'; | ||
| 3 | + console.log("stuff"); | ||
| 4 | + </script> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -119,6 +119,8 @@ <h2>Reused variable names</h2> | |||
| 119 | 119 | ||
| 120 | 120 | import { parse } from 'node:url' | |
| 121 | 121 | text('.url', parse('https://vitejs.dev').hostname) | |
| 122 | + | ||
| 123 | + import './index.astro' | ||
| 122 | 124 | </script> | |
| 123 | 125 | ||
| 124 | 126 | <script type="module"> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,6 +50,15 @@ module.exports = { | |||
| 50 | 50 | res.end('pong') | |
| 51 | 51 | }) | |
| 52 | 52 | } | |
| 53 | + }, | ||
| 54 | + { | ||
| 55 | + name: 'test-astro', | ||
| 56 | + transform(code, id) { | ||
| 57 | + if (id.endsWith('.astro')) { | ||
| 58 | + code = `export default {}` | ||
| 59 | + return { code } | ||
| 60 | + } | ||
| 61 | + } | ||
| 53 | 62 | } | |
| 54 | 63 | ] | |
| 55 | 64 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -281,6 +281,8 @@ function esbuildScanPlugin( | |||
| 281 | 281 | let loader: Loader = 'js' | |
| 282 | 282 | if (lang === 'ts' || lang === 'tsx' || lang === 'jsx') { | |
| 283 | 283 | loader = lang | |
| 284 | + } else if (path.endsWith('.astro')) { | ||
| 285 | + loader = 'ts' | ||
| 284 | 286 | } | |
| 285 | 287 | const srcMatch = openTag.match(srcRE) | |
| 286 | 288 | if (srcMatch) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments