fix: need to fetch active config after defining options
This commit is contained in:
parent
73cf786750
commit
188e9e4155
|
@ -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",
|
||||
|
|
Reference in New Issue