forked from patternfly/patternfly-react-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.constants.ts
More file actions
32 lines (29 loc) · 951 Bytes
/
vite.config.constants.ts
File metadata and controls
32 lines (29 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import path from "path";
const HOST = process.env.HOST || "localhost"; // use "local-ip" for local debug
const PORT = process.env.PORT || 8081;
const PROXY = `http://${HOST}:${PORT}`;
const DIR_PATH = path.join.bind(this, __dirname);
const PROJECT_PATH = path.join.bind(this, process.cwd());
const projectCommon = {
paths: {
bg_images: "bgimages",
build: PROJECT_PATH("dist"),
node_modules: DIR_PATH("node_modules"),
jedi_root_path: DIR_PATH("./"),
tsconfig: PROJECT_PATH("tsconfig.json"),
projectPath: PROJECT_PATH(""),
favicon: PROJECT_PATH("src/favicon.png"),
index_tsx: PROJECT_PATH("src/index.tsx"),
index_html: PROJECT_PATH("src/index.html"),
app: PROJECT_PATH("src"),
asset: process.env.ASSET_PATH || "",
},
server: {
host: HOST,
port: Number(PORT),
proxy: PROXY,
ssl: process.env.SERVER_SSL || false,
context: ["/api", "/restapi"],
},
};
export default projectCommon;