invalid import "import(`@assets/${imageName}-${scale}x.${format}`)". Variable bare imports are not supported, imports must start with ./ in the static part of the import. For example: import(`./foo/${bar}.js`).
Config
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import sitemap from "@astrojs/sitemap";
import preact from "@astrojs/preact";
import { resolve } from "path";
import { normalizePath } from "vite";
import blurhash from "rollup-plugin-blurhash-as";
import image from "@astrojs/image";
import dynamicImport from "vite-plugin-dynamic-import";
// https://astro.build/config
//
export default defineConfig({
site: "https://introvert-test.com",
integrations: [tailwind(), sitemap(), preact()],
vite: {
resolve: {
alias: { "@": normalizePath(resolve(process.cwd(), "./src")) },
},
plugins: [
dynamicImport(),
{
...blurhash(),
enforce: "pre",
},
],
},
});
Thanks for the lib
Config