-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathvite.config.js
More file actions
38 lines (37 loc) · 852 Bytes
/
vite.config.js
File metadata and controls
38 lines (37 loc) · 852 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
import { defineConfig } from "vite";
import injectHTML from "vite-plugin-html-inject";
import FullReload from "vite-plugin-full-reload";
import path from "path";
export default defineConfig({
root: "src",
base: "/Midwest-Pumpkins/",
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
},
build: {
rollupOptions: {
input: {
main: path.resolve(__dirname, "src/index.html"),
},
},
outDir: path.resolve(__dirname, "dist"),
cssCodeSplit: true,
},
css: {
modules: {
scopeBehaviour: "local",
generateScopedName: "[name]__[local]___[hash:base64:5]",
},
},
server: {
port: 3000,
open: true,
},
publicDir: path.resolve(__dirname, "public"),
plugins: [
injectHTML(),
FullReload(["./src/**/*.html", "./src/**/*.css", "./src/**/*.js"]),
],
});