From 3e8844fa871fa477026375db6d921beb4b23b0dc Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Wed, 2 Feb 2022 11:35:13 -0500 Subject: [PATCH] Fix support for scss in static build (#2522) * Fix support for scss in static build * Adds a changeset * Pass the normalizedID to transformWithVite --- .changeset/brown-dancers-perform.md | 5 ++ examples/fast-build/src/pages/index.astro | 4 +- examples/fast-build/src/styles/_global.scss | 1 + .../astro/src/vite-plugin-astro/compile.ts | 44 +++++++----- packages/astro/src/vite-plugin-astro/hmr.ts | 68 +++++++++++++++++++ packages/astro/src/vite-plugin-astro/index.ts | 12 +++- 6 files changed, 114 insertions(+), 20 deletions(-) create mode 100644 .changeset/brown-dancers-perform.md create mode 100644 examples/fast-build/src/styles/_global.scss create mode 100644 packages/astro/src/vite-plugin-astro/hmr.ts diff --git a/.changeset/brown-dancers-perform.md b/.changeset/brown-dancers-perform.md new file mode 100644 index 000000000..23591a3d5 --- /dev/null +++ b/.changeset/brown-dancers-perform.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix for CSS superset support and HMR in the static build diff --git a/examples/fast-build/src/pages/index.astro b/examples/fast-build/src/pages/index.astro index 4d13ae5a5..0b7e7ff21 100644 --- a/examples/fast-build/src/pages/index.astro +++ b/examples/fast-build/src/pages/index.astro @@ -17,9 +17,9 @@ import ExternalHoisted from '../components/ExternalHoisted.astro'; }