chore: update vitest config to support loading icons
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
import { defineConfig } from "vitest/config"
|
import { defineConfig } from "vitest/config"
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
|
import Icons from "unplugin-icons/vite"
|
||||||
|
import { FileSystemIconLoader } from "unplugin-icons/loaders"
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
test: {
|
test: {
|
||||||
@@ -9,6 +11,22 @@ export default defineConfig({
|
|||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"~": path.resolve(__dirname, "../hoppscotch-common/src"),
|
"~": path.resolve(__dirname, "../hoppscotch-common/src"),
|
||||||
|
"@composables": path.resolve(
|
||||||
|
__dirname,
|
||||||
|
"../hoppscotch-common/src/composables"
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
plugins: [
|
||||||
|
Icons({
|
||||||
|
compiler: "vue3",
|
||||||
|
customCollections: {
|
||||||
|
hopp: FileSystemIconLoader("../hoppscotch-common/assets/icons"),
|
||||||
|
auth: FileSystemIconLoader("../hoppscotch-common/assets/icons/auth"),
|
||||||
|
brands: FileSystemIconLoader(
|
||||||
|
"../hoppscotch-common/assets/icons/brands"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
}) as any,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user