2024-04-22 23:59:55 +01:00
|
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
import path from "path";
|
|
|
|
import { glob } from "glob";
|
2024-04-24 00:12:54 +01:00
|
|
|
import { ViteImageOptimizer } from 'vite-plugin-image-optimizer';
|
|
|
|
|
2024-04-22 23:59:55 +01:00
|
|
|
|
|
|
|
export default defineConfig({
|
2024-04-24 00:12:54 +01:00
|
|
|
plugins: [
|
|
|
|
ViteImageOptimizer(),
|
|
|
|
],
|
2024-04-22 23:59:55 +01:00
|
|
|
root: "src",
|
|
|
|
build: {
|
|
|
|
manifest: true,
|
|
|
|
outDir: path.join(__dirname, "dist"),
|
|
|
|
rollupOptions: {
|
2024-04-24 00:12:54 +01:00
|
|
|
input: glob.sync([path.resolve(__dirname, "src/assets", "**/*.*"), path.resolve(__dirname, "src", "**/*.html"),path.resolve(__dirname, "src", "**/*.js"), path.resolve(__dirname, "src", "**/*.css")]),
|
2024-04-22 23:59:55 +01:00
|
|
|
},
|
|
|
|
emptyOutDir: true,
|
|
|
|
},
|
|
|
|
test: {
|
|
|
|
include: ['src/**/*.{test,spec}.{js,ts}']
|
|
|
|
}
|
|
|
|
});
|