From 22c10a6f9ad8dcefc309fd04bbf6b043d965d571 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Sat, 22 Jul 2023 17:22:57 +0100 Subject: [PATCH] Tree shake DomPurify. --- package.json | 1 + pnpm-lock.yaml | 3 +++ src/components/CollapsableText.vue | 14 ++++++++++++-- src/components/CommentItem.vue | 9 ++++++++- src/components/WatchVideo.vue | 8 ++++++-- src/main.js | 27 --------------------------- src/utils/HtmlUtils.js | 26 ++++++++++++++++++++++++++ 7 files changed, 56 insertions(+), 32 deletions(-) create mode 100644 src/utils/HtmlUtils.js diff --git a/package.json b/package.json index c449f0b0..312f5035 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "@iconify-json/fa6-solid": "1.1.13", "@intlify/unplugin-vue-i18n": "0.12.2", "@unocss/preset-icons": "0.53.6", + "@unocss/preset-uno": "0.53.6", "@unocss/preset-web-fonts": "0.53.6", "@unocss/reset": "0.53.6", "@unocss/transformer-directives": "0.53.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 12f23828..8b8a9c70 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,6 +64,9 @@ devDependencies: '@unocss/preset-icons': specifier: 0.53.6 version: 0.53.6 + '@unocss/preset-uno': + specifier: 0.53.6 + version: 0.53.6 '@unocss/preset-web-fonts': specifier: 0.53.6 version: 0.53.6 diff --git a/src/components/CollapsableText.vue b/src/components/CollapsableText.vue index b013fb03..d3d3e9e3 100644 --- a/src/components/CollapsableText.vue +++ b/src/components/CollapsableText.vue @@ -1,8 +1,8 @@