forked from stepanenko3/nova-logs-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
41 lines (37 loc) · 1.11 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
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [vue()],
define: {
"process.env": process.env, // Vite ditched process.env, so we need to pass it in
},
build: {
outDir: resolve(__dirname, "dist"),
emptyOutDir: true,
target: "ES2022",
minify: true,
manifest: true,
lib: {
entry: resolve(__dirname, "resources/js/tool.js"),
name: "tool",
formats: ["umd"],
fileName: () => "js/tool.js",
},
rollupOptions: {
input: resolve(__dirname, "resources/js/tool.js"),
external: ["vue", "Nova", "LaravelNova"],
output: {
globals: {
vue: "Vue",
nova: "Nova",
"laravel-nova": "LaravelNova",
},
assetFileNames: "css/tool.css",
},
},
},
optimizeDeps: {
include: ["vue", "@inertiajs/inertia", "@inertiajs/inertia-vue3", "axios"],
},
});