intellitester 0.2.32 → 0.2.34
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/cli/index.cjs +9 -1
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +9 -1
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -1798,7 +1798,15 @@ var main = async () => {
|
|
|
1798
1798
|
if (options.preview || options.prod) {
|
|
1799
1799
|
const hasConfigFile = await fileExists(CONFIG_FILENAME);
|
|
1800
1800
|
const config = hasConfigFile ? await chunkDPT2LVTT_cjs.loadIntellitesterConfig(CONFIG_FILENAME) : void 0;
|
|
1801
|
-
const
|
|
1801
|
+
const previewCwd = config?.webServer?.cwd ? path4__namespace.default.resolve(process2__default.default.cwd(), config.webServer.cwd) : process2__default.default.cwd();
|
|
1802
|
+
if (previewCwd !== process2__default.default.cwd()) {
|
|
1803
|
+
const appEnvPath = path4__namespace.default.join(previewCwd, ".env");
|
|
1804
|
+
if (await fileExists(appEnvPath)) {
|
|
1805
|
+
dotenv2__default.default.config({ path: appEnvPath, override: true });
|
|
1806
|
+
console.log(`Loaded .env from ${previewCwd}`);
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
const { cleanup } = await buildAndPreview(config, previewCwd, options.freshBuild);
|
|
1802
1810
|
previewCleanup = cleanup;
|
|
1803
1811
|
}
|
|
1804
1812
|
const runOpts = {
|