-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
109 lines (97 loc) · 2.03 KB
/
nuxt.config.ts
File metadata and controls
109 lines (97 loc) · 2.03 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import { defineNuxtConfig } from "nuxt/config";
import path from "path";
import vueJSX from "@vitejs/plugin-vue-jsx";
export default defineNuxtConfig({
ssr: false,
devServer: {
port: 5000
},
telemetry: false,
imports: {
autoImport: false
},
css: ["~/assets/css/main.css", "element-plus/theme-chalk/dark/css-vars.css"],
modules: [
"@element-plus/nuxt",
"@pinia/nuxt",
[
"pinia-plugin-persistedstate/nuxt",
{
key: "__glj_persisted_%id",
storage: "localStorage"
}
],
"@nuxtjs/tailwindcss"
],
alias: {
"@": path.resolve(__dirname, "./")
},
experimental: {
payloadExtraction: false
},
devtools: {
enabled: false
},
router: {
options: {
hashMode: true
}
},
vite: {
plugins: [vueJSX({})],
envDir: "env",
optimizeDeps: {
// include: [...optimizeDepsElementPlusIncludes]
},
// prevent vite from obscuring rust errors
clearScreen: false,
// Tauri expects a fixed port, fail if that port is not available
server: {
strictPort: true
},
// to access the Tauri environment variables set by the CLI with information about the current target
envPrefix: ["VITE_", "TAURI_"],
build: {
// minify: "esbuild",
chunkSizeWarningLimit: 1500,
// Tauri uses Chromium on Windows and WebKit on macOS and Linux
target: process.env.TAURI_PLATFORM == "windows" ? "chrome105" : "safari13",
// don't minify for debug builds
minify: !process.env.TAURI_DEBUG ? "esbuild" : false,
// 为调试构建生成源代码映射 (sourcemap)
sourcemap: !!process.env.TAURI_DEBUG
},
esbuild: {
// pure: ["console.log"],
drop: ["debugger"]
}
},
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
},
app: {
rootId: "__easytier",
cdnURL: "./",
buildAssetsDir: "__easytier/",
head: {
meta: [
{
name: "viewport",
content: "width=device-width, initial-scale=1"
},
{
charset: "utf-8"
}
],
title: "easytier-game"
// link: [],
// style: [],
// script: [],
// noscript: []
}
},
compatibilityDate: "2024-11-12"
});