-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.mts
More file actions
41 lines (39 loc) · 909 Bytes
/
vite.config.mts
File metadata and controls
41 lines (39 loc) · 909 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
34
35
36
37
38
39
40
41
import { defineConfig } from "vite";
import { viteStaticCopy } from "vite-plugin-static-copy";
import react from "@vitejs/plugin-react";
const ENV_PREFIX = "IMJS_";
// https://vite.dev/config/
export default defineConfig(() => {
return {
build: {
chunkSizeWarningLimit: 8000, // Increase chunk size warning limit to avoid warnings for large chunks
},
plugins: [
react(),
viteStaticCopy({
targets: [
{
// copy assets from `@itwin` dependencies
src: "./node_modules/**/@itwin/*/lib/public/*",
dest: ".",
},
],
}),
],
server: {
port: 3000,
strictPort: true,
open: true
},
resolve: {
alias: [
{
// Resolve SASS tilde imports.
find: /^~(.*)$/,
replacement: "$1",
},
],
},
envPrefix: ENV_PREFIX
};
});