-
Notifications
You must be signed in to change notification settings - Fork 13
/
vite.config.js
46 lines (38 loc) · 1.16 KB
/
vite.config.js
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, loadEnv } from "vite";
import vue from "@vitejs/plugin-vue";
import laravel from "laravel-vite-plugin";
import path from "path";
export default defineConfig(({ mode }) => {
const envDir = "../../../";
Object.assign(process.env, loadEnv(mode, envDir));
return {
build: {
emptyOutDir: true,
},
envDir,
server: {
host: process.env.VITE_HOST || "localhost",
port: process.env.VITE_PORT || 5174,
},
plugins: [
vue(),
laravel({
hotFile: "../../../public/google-vite.hot",
publicDirectory: "../../../public",
buildDirectory: "google/build",
input: [
"src/Resources/assets/css/app.css",
"src/Resources/assets/js/app.js",
],
refresh: true,
}),
],
experimental: {
renderBuiltUrl(filename, { hostId, hostType, type }) {
if (hostType === "css") {
return path.basename(filename);
}
},
},
};
});