| 1 |
import {defineConfig} from "vitest/config"; |
| 2 |
|
| 3 |
export default defineConfig({ |
| 4 |
base: "./", |
| 5 |
build: { |
| 6 |
outDir: "_static/viewer", |
| 7 |
emptyOutDir: true, |
| 8 |
lib: { |
| 9 |
entry: { |
| 10 |
component: "viewer_src/main.ts", |
| 11 |
viewer: "viewer_src/auto_mount.ts", |
| 12 |
}, |
| 13 |
cssFileName: "viewer", |
| 14 |
formats: ["es"], |
| 15 |
fileName: (_format, entryName) => `${entryName}.js`, |
| 16 |
}, |
| 17 |
rollupOptions: { |
| 18 |
output: { |
| 19 |
assetFileNames: "[name][extname]", |
| 20 |
chunkFileNames: "[name]-[hash].js", |
| 21 |
}, |
| 22 |
}, |
| 23 |
}, |
| 24 |
test: { |
| 25 |
include: ["tests/**/*.test.ts"], |
| 26 |
}, |
| 27 |
}); |