diff --git a/astro.config.mjs b/astro.config.mjs index 100837f..561b48e 100755 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -6,12 +6,21 @@ export default defineConfig({ base: '', integrations: [react()], vite: { - css: { - preprocessorOptions: { - scss: { - api: "modern-compiler" - } - } + // Force worker to use ES modules instead of iife + worker: { + format: 'es' + }, + build: { + rollupOptions: { + // Ensure the main bundle also uses ES modules + output: { + format: 'es', + }, + }, + }, + ssr: { + // If necessary, ensure @jsquash/jxl isn't externalized + noExternal: ['@jsquash/jxl', '@jsquash/png'] } } -}); \ No newline at end of file +}); diff --git a/src/pages/index.astro b/src/pages/index.astro index 62b95a6..983fa44 100755 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -4,7 +4,7 @@ import Layout from "@layouts/DefaultLayout.astro"; import ContentCard from "@components/ContentCard.astro"; import Section from "@components/Section.astro"; import { dateToParts } from "src/utils/date"; -import { DevToolsStatus } from "../components/fun/Console"; +import { DevToolsStatus } from "@components/fun/Console"; const allBlogPosts = await getCollection("blog"); const allResearchPosts = await getCollection("research");