Files
element-call/vite-sdk.config.js

34 lines
987 B
JavaScript
Raw Normal View History

2025-11-24 09:44:21 +01:00
/*
Copyright 2025 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { defineConfig, mergeConfig } from "vite";
import fullConfig from "./vite.config";
2025-11-30 20:31:21 +01:00
import nodePolyfills from "vite-plugin-node-stdlib-browser";
2025-11-24 09:44:21 +01:00
const base = "./";
// Config for embedded deployments (possibly hosted under a non-root path)
export default defineConfig((env) =>
mergeConfig(
fullConfig({ ...env, packageType: "sdk" }),
2025-11-24 09:44:21 +01:00
defineConfig({
base, // Use relative URLs to allow the app to be hosted under any path
// publicDir: false, // Don't serve the public directory which only contains the favicon
build: {
manifest: true,
lib: {
entry: "./sdk/main.ts",
name: "matrixrtc-sdk",
2025-11-24 09:44:21 +01:00
// the proper extensions will be added
fileName: "matrixrtc-sdk",
2025-11-24 09:44:21 +01:00
},
},
2025-11-30 20:31:21 +01:00
plugins: [nodePolyfills()],
2025-11-24 09:44:21 +01:00
}),
),
);