-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
58 lines (57 loc) · 2.29 KB
/
vite.config.ts
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// import copy from "@guanghechen/rollup-plugin-copy";
// import del from "rollup-plugin-delete"
// import webWorkerLoader from "rollup-plugin-web-worker-loader";
// https://vitejs.dev/config/
export default defineConfig({
base: "",
//Add build if you are going to use a Git-based (GitHub or CodeCommit) deployment
build: {
outDir: "build",
// rollupOptions: {
// external: [
// "@aws-amplify/analytics", "@aws-amplify/api", "@aws-amplify/auth", "@aws-amplify/core",
// "@aws-amplify/geo", "@aws-amplify/interactions", "@aws-amplify/storage", "@aws-amplify/ui",
// "@aws-amplify/xr", "aws_amplify", "aws_amplify_react", "aws_amplify_core",
// "Buffer", "CustomEvent", "HTMLWidgets", "react", "Shiny", "shiny", "shinyjs"
// ],
// plugins: [
// // Deletes previous assets
// del({ targets: "./src/www/assets/*" }),
// // Copy outputs to templates and www dirs
// copy({
// hook: "writeBundle",
// targets: [
// { src: [ "./dist/index.html" ], dest: "src/templates" },
// { src: [ "./dist/assets" ], dest: "src/www/" },
// { src: [ "./public/*" ], dest: "src/www/" }
// ]
// })
// ]
// }
},
external: [
// "@aws-amplify/analytics", "@aws-amplify/api", "@aws-amplify/auth", "@aws-amplify/core",
// "@aws-amplify/geo", "@aws-amplify/interactions", "@aws-amplify/storage", "@aws-amplify/ui",
// "@aws-amplify/xr", "aws_amplify", "aws_amplify_react", "aws_amplify_core",
// "Buffer", "CustomEvent", "HTMLWidgets", "react", "Shiny", "shiny", "shinyjs"
],
// optimizeDeps: {
// disabled: false,
// },
plugins: [
react(),
//webWorkerLoader(/* configuration */),
],
resolve: {
alias: [
// {
// find: "@", replacement: resolve(__dirname, "./src"),
// },
{
find: "./runtimeConfig", replacement: "./runtimeConfig.browser",
}
]
}
});