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 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(
|
["background", "bootloader", "bridge", "crypto", "cryptoLoader"].forEach(
|
||||||
(item) => {
|
(item) => {
|
||||||
config[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({
|
export default defineConfig({
|
||||||
build: {
|
build: {
|
||||||
outDir: "lib",
|
outDir: "lib",
|
||||||
|
|
Reference in New Issue