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.
23 lines
418 B
TypeScript
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: {
|
|
icons: "./src/icons.scss",
|
|
},
|
|
formats: ["es"],
|
|
},
|
|
rollupOptions: {
|
|
input: "src/icons.scss",
|
|
output: {
|
|
assetFileNames: "icons.css",
|
|
},
|
|
},
|
|
},
|
|
});
|