diff --git a/vite.config.js b/vite.config.js index d73c924..a1229f2 100644 --- a/vite.config.js +++ b/vite.config.js @@ -5,11 +5,6 @@ import { resolve } from "path"; const config = {}; -const currentConfig = config[process.env.LIB_NAME]; -if (currentConfig === undefined) { - throw new Error("LIB_NAME is not defined or is not valid"); -} - ["background", "bootloader", "bridge", "crypto", "cryptoLoader"].forEach( (item) => { config[item] = { @@ -19,6 +14,11 @@ if (currentConfig === undefined) { }, ); +const currentConfig = config[process.env.LIB_NAME]; +if (currentConfig === undefined) { + throw new Error("LIB_NAME is not defined or is not valid"); +} + export default defineConfig({ build: { outDir: "lib",