import { resolve } from "node:path"; import Icons from "unplugin-icons/vite"; import { defineConfig } from "vite"; export default defineConfig({ css: { preprocessorOptions: { scss: { quietDeps: true, api: "modern-compiler", }, }, }, build: { lib: { entry: resolve(__dirname, "src/index.ts"), name: JSON.stringify(process.env.npm_package_name), fileName: () => "index.js", formats: ["es"], }, target: "esnext", }, plugins: [ Icons({ compiler: "web-components", webComponents: { autoDefine: true, }, autoInstall: true, scale: 1, }), ], resolve: { alias: { "@components": "/src/components", "@cypress": "/cypress", "@helpers": "/src/helpers", "@mocks": "/src/mocks", "@stories": "/stories", "@styles": "/src/styles", "@src": "/src", }, }, });