forked from Tonomy-Foundation/Tonomy-App-Websites
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
33 lines (28 loc) · 859 Bytes
/
vite.config.ts
File metadata and controls
33 lines (28 loc) · 859 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
33
import { defineConfig, UserConfigExport } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig((env) => {
const config: UserConfigExport = {
plugins: [react()],
server: {
port: 5174,
strictPort: true,
},
resolve: {
alias: {},
},
};
if (process.env.VITE_APP_NODE_ENV === "local") {
console.log("Running in local mode and linking to local ../Tonomy-ID-SDK");
config.resolve.alias["@tonomy/tonomy-id-sdk"] =
__dirname + "/../Tonomy-ID-SDK";
}
// fix for https://github.com/decentralized-identity/ethr-did-resolver/issues/186
if (env.mode === "development") {
config.resolve.alias["ethr-did-resolver"] = path.resolve(
"./node_modules/ethr-did-resolver/src/index.ts",
);
}
return config;
});