From 853c704581abb149b72d42742a80a6c9d4d90293 Mon Sep 17 00:00:00 2001 From: BANANAPEEL202 Date: Tue, 15 Oct 2024 19:42:31 -0400 Subject: [PATCH] fixed load times https://github.com/tabler/tabler-icons/issues/1233 --- package-lock.json | 47 +++++++++++++++++++++++++++------- package.json | 6 +++-- src/components/PreviewCard.tsx | 4 ++- vite.config.ts | 3 +++ 4 files changed, 48 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index b1b13ea..15d9003 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,8 +13,10 @@ "@mantine/dates": "^7.13.1", "@mantine/form": "^7.13.1", "@mantine/hooks": "^7.13.1", - "@tabler/icons-react": "^3.19.0", + "@tabler/icons-react": "3.17.0", "dayjs": "^1.11.13", + "i": "^0.3.7", + "icons-react": "^3.7.1", "react": "^18.3.1", "react-dom": "^18.3.1", "recharts": "^2.12.7" @@ -47,7 +49,7 @@ "storybook": "^8.3.4", "typescript": "^5.5.3", "typescript-eslint": "^8.0.1", - "vite": "^5.4.1" + "vite": "5.4.8" } }, "node_modules/@adobe/css-tools": { @@ -2471,20 +2473,20 @@ } }, "node_modules/@tabler/icons": { - "version": "3.19.0", - "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.19.0.tgz", - "integrity": "sha512-A4WEWqpdbTfnpFEtwXqwAe9qf9sp1yRPvzppqAuwcoF0q5YInqB+JkJtSFToCyBpPVeLxJUxxkapLvt2qQgnag==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.17.0.tgz", + "integrity": "sha512-sCSfAQ0w93KSnSL7tS08n73CdIKpuHP8foeLMWgDKiZaCs8ZE//N3ytazCk651ZtruTtByI3b+ZDj7nRf+hHvA==", "funding": { "type": "github", "url": "https://github.com/sponsors/codecalm" } }, "node_modules/@tabler/icons-react": { - "version": "3.19.0", - "resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-3.19.0.tgz", - "integrity": "sha512-AqEWGI0tQWgqo6ZjMO5yJ9sYT8oXLuAM/up0hN9iENS6IdtNZryKrkNSiMgpwweNTpl8wFFG/dAZ959S91A/uQ==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-3.17.0.tgz", + "integrity": "sha512-Ndm9Htv7KpIU1PYYrzs5EMhyA3aZGcgaxUp9Q1XOxcRZ+I0X+Ub2WS5f4bkRyDdL1s0++k2T9XRgmg2pG113sw==", "dependencies": { - "@tabler/icons": "3.19.0" + "@tabler/icons": "3.17.0" }, "funding": { "type": "github", @@ -3624,6 +3626,14 @@ "node": ">=6" } }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase-css": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", @@ -5478,6 +5488,25 @@ "url": "https://github.com/sponsors/typicode" } }, + "node_modules/i": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.7.tgz", + "integrity": "sha512-FYz4wlXgkQwIPqhzC5TdNMLSE5+GS1IIDJZY/1ZiEPCT2S3COUVZeT5OW4BmW4r5LHLQuOosSwsvnroG9GR59Q==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/icons-react": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/icons-react/-/icons-react-3.7.1.tgz", + "integrity": "sha512-HrBgOi+GKbtwBVIjgRx6KM7CenGc3s889ntLUc0QXdwtF0cmW+Avr751VSFlM1Rq8rf6ciCT5fkwMwYcEmUzaQ==", + "dependencies": { + "camelcase": "^5.0.0" + }, + "peerDependencies": { + "react": "*" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", diff --git a/package.json b/package.json index 3f4e8f1..1161121 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,10 @@ "@mantine/dates": "^7.13.1", "@mantine/form": "^7.13.1", "@mantine/hooks": "^7.13.1", - "@tabler/icons-react": "^3.19.0", + "@tabler/icons-react": "3.17.0", "dayjs": "^1.11.13", + "i": "^0.3.7", + "icons-react": "^3.7.1", "react": "^18.3.1", "react-dom": "^18.3.1", "recharts": "^2.12.7" @@ -53,7 +55,7 @@ "storybook": "^8.3.4", "typescript": "^5.5.3", "typescript-eslint": "^8.0.1", - "vite": "^5.4.1" + "vite": "5.4.8" }, "lint-staged": { "*.{ts,tsx,js,jsx}": [ diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index d656484..fc6d35d 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -1,6 +1,8 @@ import React from "react"; import { Text, Button, Grid, Menu, rem } from "@mantine/core"; -import { IconDownload, IconChevronDown, IconFile } from "@tabler/icons-react"; +import { IconDownload } from "@tabler/icons-react"; +import { IconChevronDown } from "@tabler/icons-react"; +import { IconFile } from "@tabler/icons-react"; import "@/css/PreviewCard.css"; function PreviewCard() { diff --git a/vite.config.ts b/vite.config.ts index 4a5678e..7ddc6bc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,6 +5,9 @@ import path from "path"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + optimizeDeps: { + include: ["@tabler/icons-react"], + }, resolve: { alias: { "@": path.resolve(__dirname, "./src"),