|
@@ -2,7 +2,7 @@
|
|
|
* @Author: wjc
|
|
|
* @Date: 2024-05-27 10:17:11
|
|
|
* @LastEditors: wjc
|
|
|
- * @LastEditTime: 2024-06-26 15:13:07
|
|
|
+ * @LastEditTime: 2024-07-01 10:07:07
|
|
|
* @Description:
|
|
|
*/
|
|
|
import path from 'node:path'
|
|
@@ -11,6 +11,7 @@ import UnoCSS from 'unocss/vite'
|
|
|
import uni from '@dcloudio/vite-plugin-uni'
|
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
|
import Components from 'unplugin-vue-components/vite'
|
|
|
+import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
|
|
|
|
|
import UniLayouts from '@uni-helper/vite-plugin-uni-layouts'
|
|
|
// import UniPages from '@uni-helper/vite-plugin-uni-pages'
|
|
@@ -44,6 +45,11 @@ export default defineConfig(({ mode }) => {
|
|
|
UniLayouts(),
|
|
|
// UniPages(),
|
|
|
UnoCSS(),
|
|
|
+ createSvgIconsPlugin({
|
|
|
+ iconDirs: [pathResolve('src/static/icons')],
|
|
|
+ symbolId: 'icon-[dir]-[name]',
|
|
|
+ svgoOptions: true,
|
|
|
+ }),
|
|
|
Components({
|
|
|
// 按需导入组件,相关组件声明放置于 components.d.ts
|
|
|
dts: './types/components.d.ts',
|