@vixt/core 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -319,6 +319,7 @@ const name$1 = "vixt:config";
|
|
|
319
319
|
const config = defineVixtModule({
|
|
320
320
|
meta: { name: name$1 },
|
|
321
321
|
setup(_, vixt) {
|
|
322
|
+
let env;
|
|
322
323
|
return {
|
|
323
324
|
name: name$1,
|
|
324
325
|
enforce: "pre",
|
|
@@ -336,7 +337,7 @@ const config = defineVixtModule({
|
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
339
|
defaultAlias["#"] = buildDir;
|
|
339
|
-
|
|
340
|
+
env = loadEnv(config2.mode, config2.envDir, config2.envPrefix);
|
|
340
341
|
const defineEnv = Object.fromEntries(
|
|
341
342
|
Object.entries(env).filter(([k]) => !["MODE", "DEV", "PROD"].includes(k)).map(([k, v]) => [`import.meta.env.${k}`, JSON.stringify(v)])
|
|
342
343
|
);
|
|
@@ -349,6 +350,7 @@ const config = defineVixtModule({
|
|
|
349
350
|
};
|
|
350
351
|
},
|
|
351
352
|
configResolved(config2) {
|
|
353
|
+
Object.assign(config2.env, { ...env, ...config2.env });
|
|
352
354
|
vixt.options.vite = config2;
|
|
353
355
|
},
|
|
354
356
|
configureServer(server) {
|