From 9fdd0a3ae8caaf8a3633b9e2cc81a350ed5cef63 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 12 May 2022 23:37:52 -0600 Subject: [PATCH] feat: backport treat Astro file scripts as TS (#8151) --- packages/playground/optimize-deps/index.astro | 4 ++++ packages/playground/optimize-deps/index.html | 2 ++ packages/playground/optimize-deps/vite.config.js | 9 +++++++++ packages/vite/src/node/optimizer/scan.ts | 2 ++ 4 files changed, 17 insertions(+) create mode 100644 packages/playground/optimize-deps/index.astro diff --git a/packages/playground/optimize-deps/index.astro b/packages/playground/optimize-deps/index.astro new file mode 100644 index 00000000000000..95790f5bf3a0d5 --- /dev/null +++ b/packages/playground/optimize-deps/index.astro @@ -0,0 +1,4 @@ + diff --git a/packages/playground/optimize-deps/index.html b/packages/playground/optimize-deps/index.html index 521d54379863d9..84102705fae3a5 100644 --- a/packages/playground/optimize-deps/index.html +++ b/packages/playground/optimize-deps/index.html @@ -119,6 +119,8 @@

Reused variable names

import { parse } from 'node:url' text('.url', parse('https://vitejs.dev').hostname) + + import './index.astro'