Files
sendou.ink/scripts/scanner/vite-node.config.ts
2026-09-02 21:02:01 +03:00

18 lines
504 B
TypeScript

/**
* vite-node config for the scanner scripts. The root vite.config.ts
* pre-bundles @techstark/opencv-js for the browser worker, and vite-node would
* resolve that prebundle (which crashes on __dirname in Node); without the
* include it externalizes the dep to a plain require of the patched CJS bundle.
*/
import { defineConfig } from "vite";
export default defineConfig({
resolve: {
tsconfigPaths: true,
},
optimizeDeps: {
noDiscovery: true,
exclude: ["@techstark/opencv-js"],
},
});