8850e6c00f
* chore: bump jsdom to the latest version * feat(pdf): support TTS and annotation on PDFs, closes #2149 & closes #3462
22 lines
733 B
TypeScript
22 lines
733 B
TypeScript
import path from 'path';
|
|
import { defineConfig } from 'vitest/config';
|
|
import react from '@vitejs/plugin-react';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
|
|
export default defineConfig({
|
|
plugins: [tsconfigPaths(), react()],
|
|
resolve: {
|
|
alias: {
|
|
// The @pdfjs alias from tsconfig only resolves within the app's own
|
|
// source files. foliate-js/pdf.js lives outside that scope, so Vite
|
|
// needs an explicit alias to find the vendored pdfjs build.
|
|
'@pdfjs': path.resolve(__dirname, 'public/vendor/pdfjs'),
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
exclude: ['**/node_modules/**', '**/dist/**', '**/*.browser.test.ts', '**/*.tauri.test.ts'],
|
|
},
|
|
});
|