Files
cunningham/packages/react/vite.fonts.config.mts
jbpenrath 86815cf95b 🔧(react) migrate to vite 6
With the new major version of vite, some path resolution did not work so
we update our vite config to resolve properly paths starting by 'src'.
Furthermore there were some deprecation warning about the use of cjs
files as vite configuration so we use 'mts' extension for all vite
config files in react package to allow vite to detect them as
ES Modules.
2025-01-08 11:02:50 +01:00

23 lines
418 B
TypeScript

import { defineConfig } from "vitest/config";
// https://vitejs.dev/config/
export default defineConfig({
build: {
emptyOutDir: false,
outDir: "dist",
copyPublicDir: false,
lib: {
entry: {
fonts: "./src/fonts.scss",
},
formats: ["es"],
},
rollupOptions: {
input: "src/fonts.scss",
output: {
assetFileNames: "fonts.css",
},
},
},
});