shadow/vite.config.ts

23 lines
No EOL
703 B
TypeScript

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