From 71f81f1c5ee3f53209868fc7ad94e6689a10d879 Mon Sep 17 00:00:00 2001 From: neobooru <50623835+neobooru@users.noreply.github.com> Date: Mon, 28 Jun 2021 13:49:05 +0200 Subject: [PATCH] Optimize application size --- README.md | 1 - package.json | 1 + src/manifest.json | 20 +---- src/options/options.html | 1 + src/popup/App.vue | 6 +- src/popup/popup.html | 1 + webpack.config.js | 9 ++- yarn.lock | 171 ++++++++++++++++++++++++++++++++++++++- 8 files changed, 187 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index ce86ea0..7e87c1b 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,6 @@ These are some things I might work on. Though honestly I don't expect this exten - [low priority] Import notes - [lowest priority] Move from 'options_page' to 'options_ui' - [lowest priority] Multiple szurubooru instances (where you can choose to which one you want to upload the post) -- [lowest priority] Application size could be reduced, but I am not too worried about that because it's all local and zipped it is just 1.2MB ## FAQ diff --git a/package.json b/package.json index defb8fe..1566f68 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ }, "devDependencies": { "archiver": "^3.1.1", + "autodll-webpack-plugin": "^0.4.2", "copy-webpack-plugin": "^5.1.1", "core-js": "^3.6.5", "cross-env": "^5.2.1", diff --git a/src/manifest.json b/src/manifest.json index c19bd63..87974c0 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -12,27 +12,15 @@ "default_popup": "popup/popup.html" }, "options_page": "options/options.html", - "permissions": [ - "storage", - "activeTab", - "webRequest", - "webRequestBlocking", - "" - ], + "permissions": ["storage", "activeTab", "webRequest", "webRequestBlocking", ""], "content_scripts": [ { - "matches": [ - "" - ], - "js": [ - "scripts/content.js" - ] + "matches": [""], + "js": ["vendor.dll.js", "scripts/content.js"] } ], "background": { - "scripts": [ - "scripts/background.js" - ] + "scripts": ["vendor.dll.js", "scripts/background.js"] }, "browser_specific_settings": { "gecko": { diff --git a/src/options/options.html b/src/options/options.html index 40ab624..775ea81 100644 --- a/src/options/options.html +++ b/src/options/options.html @@ -8,6 +8,7 @@
+ diff --git a/src/popup/App.vue b/src/popup/App.vue index e145e55..e48eff1 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -10,7 +10,7 @@