forked from Qortal/chrome-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (34 loc) · 997 Bytes
/
Copy pathvite.config.ts
File metadata and controls
35 lines (34 loc) · 997 Bytes
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
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// Import path module for resolving file paths
import { resolve } from 'path';
import fixReactVirtualized from 'esbuild-plugin-react-virtualized'
export default defineConfig({
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./src/test/setup.ts']
},
plugins: [react()],
build: {
rollupOptions: {
// Specify multiple entry points for Rollup
input: {
index: resolve(__dirname, 'index.html'), // Main entry for your React app
background: resolve(__dirname, 'src/background.ts'), // Separate entry for the background script
},
output: {
// Adjust the output settings if necessary
entryFileNames: `[name].js`,
chunkFileNames: `[name].js`,
assetFileNames: `[name].[ext]`
}
}
},
optimizeDeps: {
esbuildOptions: {
plugins: [fixReactVirtualized],
},
},
});