Files
diff-viewer-extension/vite.config.ts
Pierre Jacquier b7afdb2a5f Fix content script on Chrome v130+ (#642)
* Bump to @crxjs/vite-plugin@2.0.0-beta.26

* Clean up old workaround

* Pin runner to 20.04

* Add fixme on a blob preview test
2025-01-03 15:14:44 -05:00

32 lines
885 B
TypeScript

import { defineConfig } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import { configDefaults } from 'vitest/config'
import react from '@vitejs/plugin-react'
import { crx } from '@crxjs/vite-plugin'
import manifest from './manifest.json'
export default defineConfig(() => {
return {
build: {
outDir: 'build',
},
plugins: [
react(),
crx({ manifest }),
nodePolyfills(),
],
resolve: {
alias: {
// Replaces node-fetch in kittycad.ts, cross-fetch wouldn't work
'node-fetch': 'isomorphic-fetch',
},
},
test: {
globals: true,
environment: 'happy-dom',
setupFiles: 'src/setupTests.ts',
exclude: [...configDefaults.exclude, 'tests/*'],
},
}
})