-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathvite.config.mts
More file actions
46 lines (45 loc) · 1.33 KB
/
vite.config.mts
File metadata and controls
46 lines (45 loc) · 1.33 KB
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
import { defineConfig } from "vite";
import RubyPlugin from "vite-plugin-ruby";
import FullReload from "vite-plugin-full-reload";
import checker from "vite-plugin-checker";
export default defineConfig({
plugins: [
checker({ typescript: true }),
FullReload(["config/routes.rb", "app/views/**/*"]),
RubyPlugin(),
],
resolve: {
extensions: [".js", ".ts", ".tsx", ".jsx", ".css", ".scss", ".sass"],
},
build: {
sourcemap: true,
// rollupOptions: {
// output: {
// manualChunks: (id) => {
// // Split vendor chunks for better caching
// if (id.includes("node_modules")) {
// // Group common vendor libraries together
// if (
// id.includes("react") ||
// id.includes("react-dom") ||
// id.includes("@sentry")
// ) {
// return "vendor";
// }
// if (
// id.includes("bootstrap") ||
// id.includes("jquery") ||
// id.includes("popper")
// ) {
// return "vendor";
// }
// }
// },
// },
// },
},
define: {
// Provide jQuery globally for Bootstrap 4 compatibility
global: "globalThis",
},
});