Files
diff-viewer-extension/vite.config.js
dependabot[bot] cc67811591 Bump vitest from 0.34.3 to 0.34.6 (#532)
* Bump vitest from 0.34.3 to 0.34.6

Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.34.3 to 0.34.6.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.34.6/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Move to happy-dom, type:module for vite warning, cleanup jest

* Fix __dirname and snapshots

* More snap changes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2024-01-19 06:32:54 -05:00

28 lines
838 B
JavaScript

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/*'],
},
}
})