feat: point production host at project57 embed JS [deploy]
This commit is contained in:
1 parent
076e603c93
commit
f717f1d481
4 files changed
+14
-10
No files matched your search
+5
-6
@@ -1,7 +1,6 @@
|
||||
const A_ORIGIN = (import.meta.env.VITE_A_ORIGIN || "http://localhost:3000").replace(
|
||||
/\/$/,
|
||||
""
|
||||
);
|
||||
const A_ORIGIN = (
|
||||
import.meta.env.VITE_A_ORIGIN || "https://swissicapital.net"
|
||||
).replace(/\/$/, "");
|
||||
|
||||
const errorEl = document.getElementById("aurora-error");
|
||||
|
||||
@@ -24,7 +23,7 @@ function loadScript(src: string): Promise<void> {
|
||||
|
||||
async function boot() {
|
||||
try {
|
||||
await loadScript(`${A_ORIGIN}/embed/aurora.js`);
|
||||
await loadScript(`${A_ORIGIN}/embed/aurora.js?v=1`);
|
||||
} catch {
|
||||
showError(
|
||||
`无法加载 A 站脚本:${A_ORIGIN}/embed/aurora.js。请先在 project57 执行 pnpm build:embed 并启动 A 站,或修改 .env 中的 VITE_A_ORIGIN。`
|
||||
@@ -41,7 +40,7 @@ async function boot() {
|
||||
api.mount("#aurora-root", {
|
||||
assetBase: A_ORIGIN,
|
||||
apiBase: A_ORIGIN,
|
||||
cssUrl: `${A_ORIGIN}/embed/aurora.css`,
|
||||
cssUrl: `${A_ORIGIN}/embed/aurora.css?v=1`,
|
||||
history: "hash",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user