From 2ed8c96c1201c03393a129b257e5a441e6593a0f Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Thu, 19 Dec 2024 04:20:45 +1100 Subject: [PATCH] Lint configs --- vite.base.config.ts | 2 +- vite.preload.config.ts | 2 +- vite.types.config.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vite.base.config.ts b/vite.base.config.ts index 9a215b63..948703b9 100644 --- a/vite.base.config.ts +++ b/vite.base.config.ts @@ -2,7 +2,7 @@ import { builtinModules } from 'node:module'; import type { ConfigEnv, Plugin, UserConfig } from 'vite'; import pkg from './package.json'; -export const builtins = ['electron', ...builtinModules.map((m) => [m, `node:${m}`]).flat()]; +export const builtins = ['electron', ...builtinModules.flatMap((m) => [m, `node:${m}`])]; export const external = [ ...builtins, diff --git a/vite.preload.config.ts b/vite.preload.config.ts index 11ae331b..2fbb774b 100644 --- a/vite.preload.config.ts +++ b/vite.preload.config.ts @@ -1,4 +1,4 @@ -import type { ConfigEnv, UserConfig } from 'vite'; +import type { UserConfig } from 'vite'; import { defineConfig, mergeConfig } from 'vite'; import { getBuildConfig, external } from './vite.base.config'; diff --git a/vite.types.config.ts b/vite.types.config.ts index 76fa6c80..c68df3d6 100644 --- a/vite.types.config.ts +++ b/vite.types.config.ts @@ -1,11 +1,11 @@ import { defineConfig } from 'vite'; import dts from 'vite-plugin-dts'; -import { resolve } from 'path'; +import path from 'node:path'; export default defineConfig({ build: { lib: { - entry: resolve(__dirname, 'src/main_types.ts'), + entry: path.resolve(import.meta.dirname, 'src/main_types.ts'), name: 'comfyui-electron-api', fileName: 'index', formats: ['es'],