on-internet
← Community

How should I handle nest npm libraries in my npm package?

Stack Overflow ·

I would like to create an npm library for a base electron client where consumer projects use the same shared main process/renderer/preload. And currently exposing a defineConfigs function that overloads the electron-vite configs from my npm package: import { defineConfig, loadEnv, UserConfig } from 'electron-vite' import reactPlugin from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' export function defineConfigs(fn: (config: UserConfig) => UserConfig = c => c) { return defineConfig(({ mode }) => { const env = loadEnv(mode) const envVars = Object.fromEntries(Object.entries(

Comments

Sign in or sign up to comment and upvote.

No comments yet.