改成左右布局,接上图标,措辞换成配置里的原词
图标用 unplugin-icons 在打包时内联成 SVG,运行时不发网络请求——目标机器可能没外网, 而且一个图标一次请求对 2 核的机器不划算。autoInstall 关掉,不让构建过程偷偷联网装东西。 出站显示从「跟着规则走」改成 RULE,其余解释性长句删掉或收进 title。 新增了紧凑模式(只显示图标),默认关:这工具是隔一阵子才动一次的,纯图标对偶尔来的人不友好。
This commit is contained in:
+8
-1
@@ -1,5 +1,6 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import Icons from 'unplugin-icons/vite'
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
/**
|
||||
@@ -8,7 +9,13 @@ import { fileURLToPath, URL } from 'node:url'
|
||||
*/
|
||||
export default defineConfig({
|
||||
root: 'web',
|
||||
plugins: [vue()],
|
||||
plugins: [
|
||||
vue(),
|
||||
// 图标在打包时作为内联 SVG 编进产物,运行时不发任何网络请求——
|
||||
// 目标机器可能没有外网,而且一个图标一次请求对 2 核的机器也不划算。
|
||||
// autoInstall 关掉:要用哪套图标必须显式装进 package.json,不让构建过程偷偷联网。
|
||||
Icons({ compiler: 'vue3', autoInstall: false }),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'~': fileURLToPath(new URL('./web', import.meta.url)),
|
||||
|
||||
Reference in New Issue
Block a user