fix: need to fetch active config after defining options

This commit is contained in:
Derrick Hammer 2023-07-17 11:38:16 -04:00
parent 73cf786750
commit 188e9e4155
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 5 deletions

View File

@ -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",