2022-12-22 12:46:43 +00:00
|
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
import { quasar, transformAssetUrls } from '@quasar/vite-plugin';
|
|
|
|
import jsconfigPaths from 'vite-jsconfig-paths';
|
2023-01-04 07:23:02 +00:00
|
|
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
2023-01-03 13:17:22 +00:00
|
|
|
import path from 'path';
|
2022-12-22 12:46:43 +00:00
|
|
|
|
2024-06-28 06:23:11 +00:00
|
|
|
// https://vitejs.dev/config/
|
2022-12-22 12:46:43 +00:00
|
|
|
export default defineConfig({
|
|
|
|
test: {
|
|
|
|
environment: 'happy-dom',
|
|
|
|
setupFiles: 'test/vitest/setup-file.js',
|
|
|
|
include: [
|
2024-06-28 06:23:11 +00:00
|
|
|
// Matches vitest tests in any subfolder of 'src' or into 'test/vitest/__tests__'
|
|
|
|
// Matches all files with extension 'js', 'jsx', 'ts' and 'tsx'
|
2022-12-22 12:46:43 +00:00
|
|
|
'test/vitest/__tests__/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
vue({
|
2023-04-11 11:31:03 +00:00
|
|
|
template: {
|
2024-04-02 12:12:01 +00:00
|
|
|
transformAssetUrls,
|
2023-04-11 11:31:03 +00:00
|
|
|
},
|
2022-12-22 12:46:43 +00:00
|
|
|
}),
|
|
|
|
quasar({
|
2023-04-11 11:31:03 +00:00
|
|
|
autoImportComponentCase: 'pascal',
|
2022-12-22 12:46:43 +00:00
|
|
|
sassVariables: 'src/quasar-variables.scss',
|
|
|
|
}),
|
2023-01-04 07:23:02 +00:00
|
|
|
VueI18nPlugin({
|
2024-04-18 10:38:43 +00:00
|
|
|
include: [
|
|
|
|
path.resolve(__dirname, 'src/i18n/**'),
|
|
|
|
path.resolve(__dirname, 'src/pages/**/locale/**'),
|
|
|
|
],
|
2023-01-03 13:17:22 +00:00
|
|
|
}),
|
2022-12-22 12:46:43 +00:00
|
|
|
jsconfigPaths(),
|
|
|
|
],
|
|
|
|
});
|