refactor: move frontend in apps/frontend
This commit is contained in:
1 parent
dc39113335
commit
31304c931d
225 files changed
+67
-65
No files matched your search
Executable
+48
@@ -0,0 +1,48 @@
|
||||
// vite.config.js
|
||||
/// <reference types="vitest/config" />
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin'
|
||||
import { playwright } from '@vitest/browser-playwright'
|
||||
|
||||
const dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
base: '/',
|
||||
test: {
|
||||
projects: [
|
||||
{
|
||||
extends: true,
|
||||
plugins: [
|
||||
storybookTest({
|
||||
configDir: path.join(dirname, '.storybook'),
|
||||
}),
|
||||
],
|
||||
test: {
|
||||
name: 'storybook',
|
||||
browser: {
|
||||
enabled: true,
|
||||
headless: true,
|
||||
provider: playwright({}),
|
||||
instances: [{ browser: 'chromium' }],
|
||||
},
|
||||
setupFiles: ['.storybook/vitest.setup.js'],
|
||||
},
|
||||
},
|
||||
{
|
||||
test: {
|
||||
name: 'unit',
|
||||
include: [
|
||||
'src/**/*.test.js',
|
||||
'src/**/*.test.ts',
|
||||
'utils/**/*.test.js',
|
||||
],
|
||||
environment: 'node',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user