// @ts-check import { builtinModules } from 'module'; import { chrome, makeConfig } from '../../config/vite-common'; /** @type string */ const PACKAGE_ROOT = __dirname; /** * @type {import('vite').UserConfig} * @see https://vitejs.dev/config/ */ const config = makeConfig({ root: PACKAGE_ROOT, build: { target: chrome, lib: { entry: 'src/index.ts', formats: ['cjs'], }, rollupOptions: { external: [ 'electron', ...builtinModules, ], }, }, }); export default config;