1
0
forked from baron/baron-sso

네이버 웍스 연동기능 개선

This commit is contained in:
2026-05-18 15:36:30 +09:00
parent c71ece84b8
commit e29d056b9e
61 changed files with 4137 additions and 710 deletions

View File

@@ -1,9 +1,15 @@
import { createRequire } from "node:module";
import path from "node:path";
import { fileURLToPath } from "node:url";
import react from "@vitejs/plugin-react";
import { defineConfig, type UserConfig } from "vite";
import { type UserConfig, defineConfig } from "vite";
const require = createRequire(import.meta.url);
const commonWorkspaceDir = path.resolve(
path.dirname(fileURLToPath(import.meta.url)),
"..",
);
const appWorkspaceDir = path.resolve(process.cwd());
const reactPackageDir = path.dirname(require.resolve("react/package.json"));
const reactDomPackageDir = path.dirname(
require.resolve("react-dom/package.json"),
@@ -23,6 +29,11 @@ export const commonViteConfig: UserConfig = {
build: {
emptyOutDir: true,
},
server: {
fs: {
allow: [appWorkspaceDir, commonWorkspaceDir, "/workspace/common"],
},
},
};
export function hostFromUrl(value: string | undefined) {
@@ -37,7 +48,7 @@ export function hostFromUrl(value: string | undefined) {
export function getAllowedHosts(
defaultHosts: string[],
envUrl?: string,
envAllowedHosts?: string
envAllowedHosts?: string,
) {
return Array.from(
new Set(
@@ -48,8 +59,8 @@ export function getAllowedHosts(
.split(",")
.map((host) => host.trim())
.filter(Boolean),
].filter((host): host is string => Boolean(host))
)
].filter((host): host is string => Boolean(host)),
),
);
}