Skip to content

The only tool you need to know what is happening and how to fix it.

cleanup

dduxb363b69621f7
diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js
index e0aa1e44..85e361fd 100644
--- a/frontend/svelte.config.js
+++ b/frontend/svelte.config.js
@@ -3,7 +3,7 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { existsSync } from 'fs';
import path from 'path';
-const billingPath = process.env.BILLING_PATH || '../traceway-billing/frontend';
+const billingPath = process.env.BILLING_PATH;
const resolvedBillingPath = path.resolve(process.cwd(), billingPath);
const billingExists = existsSync(resolvedBillingPath);
@@ -20,10 +20,12 @@ const config = {
adapter: adapter({
fallback: 'index.html'
}),
- alias: billingExists ? {
- '$billing': resolvedBillingPath,
- '$billing/*': `${resolvedBillingPath}/*`
- } : {}
+ alias: billingExists
+ ? {
+ $billing: resolvedBillingPath,
+ '$billing/*': `${resolvedBillingPath}/*`
+ }
+ : {}
}
};
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index 9d740fb6..52400240 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -6,28 +6,28 @@ import path from 'path';
const pkg = JSON.parse(readFileSync('./package.json', 'utf-8'));
-const billingPath = process.env.BILLING_PATH || '../traceway-billing/frontend';
+const billingPath = process.env.BILLING_PATH;
const resolvedBillingPath = path.resolve(import.meta.dirname, billingPath);
const billingExists = existsSync(resolvedBillingPath);
export default defineConfig(({ mode }) => {
- const env = loadEnv(mode, process.cwd(), '');
+ const env = loadEnv(mode, process.cwd(), '');
- return {
- plugins: [tailwindcss(), sveltekit()],
- define: {
- __APP_VERSION__: JSON.stringify(env.PUBLIC_APP_VERSION || pkg.version),
- __CLOUD_MODE__: env.CLOUD_MODE,
- __BILLING_AVAILABLE__: billingExists
- },
- server: {
- proxy: {
- '/api': {
- target: 'http://localhost:8082',
- changeOrigin: true,
- // rewrite: (path) => path.replace(/^\/api/, '')
- }
- }
- }
- }
+ return {
+ plugins: [tailwindcss(), sveltekit()],
+ define: {
+ __APP_VERSION__: JSON.stringify(env.PUBLIC_APP_VERSION || pkg.version),
+ __CLOUD_MODE__: env.CLOUD_MODE,
+ __BILLING_AVAILABLE__: billingExists
+ },
+ server: {
+ proxy: {
+ '/api': {
+ target: 'http://localhost:8082',
+ changeOrigin: true
+ // rewrite: (path) => path.replace(/^\/api/, '')
+ }
+ }
+ }
+ };
});