-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathvite.config.mts
More file actions
42 lines (41 loc) · 1.04 KB
/
vite.config.mts
File metadata and controls
42 lines (41 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/// <reference types="vitest" />
/// <reference types="@vitest/browser/matchers" />
import { defineConfig } from "vitest/config";
import { viteStaticCopy } from "vite-plugin-static-copy";
import { playwright } from '@vitest/browser-playwright'
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
base: '/blocks/',
plugins: [react(), tsconfigPaths(), viteStaticCopy({
targets: [
{
src: 'oss-attribution/**/*',
dest: "./",
},
{
src: 'src/i18n/locales/**/*',
dest: "./locales/",
},
],
}),
],
server: {
port: 3000,
},
define: {
'__APP_VERSION__': JSON.stringify(process.env.npm_package_version || '0.0.0'),
'__APP_NAME__': JSON.stringify(process.env.npm_package_name || 'BlocksA'),
},
test: {
setupFiles: ['./tests/setupTests.ts'],
browser: {
enabled: true,
provider: playwright(),
headless: true,
instances: [
{ browser: 'chromium' },
]
},
},
});