Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Element Call to be consumed as a package within a larger app #2922

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create a separate config for embedded deployment
  • Loading branch information
robintown committed Jan 4, 2025
commit 577e00f6651482d6c73fb8b5c43967974759b530
9 changes: 9 additions & 0 deletions vite-embedded.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig, mergeConfig } from "vite";
import standaloneConfig from "./vite.config";

// Config for embedded deployments (possibly hosted under a non-root path)
export default defineConfig((env) =>
mergeConfig(standaloneConfig(env), {
base: "", // Use relative URLs to allow the app to be hosted under any path
}),
);
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { sentryVitePlugin } from "@sentry/vite-plugin";
import react from "@vitejs/plugin-react";
import basicSsl from "@vitejs/plugin-basic-ssl";

// Config for standalone deployments (hosted as an SPA at the root path)
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd());
Expand Down