Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

⚡ Lazy components

Liyas Thomasaf7273e7ebee
diff --git a/pages/settings.vue b/pages/settings.vue
index 545608497..6a5b641d5 100644
--- a/pages/settings.vue
+++ b/pages/settings.vue
@@ -121,15 +121,11 @@
</style>
<script>
-import section from "../components/section";
-import swatch from "../components/settings/swatch";
-import toggle from "../components/toggle";
-
export default {
components: {
- "pw-section": section,
- "pw-toggle": toggle,
- swatch: swatch
+ "pw-section": () => import("../components/section"),
+ "pw-toggle": () => import("../components/toggle"),
+ swatch: () => import("../components/settings/swatch")
},
data() {
diff --git a/pages/websocket.vue b/pages/websocket.vue
index dd33f12a8..2e92061c2 100644
--- a/pages/websocket.vue
+++ b/pages/websocket.vue
@@ -112,10 +112,9 @@ div.log {
</style>
<script>
-import section from "../components/section";
export default {
components: {
- "pw-section": section
+ "pw-section": () => import("../components/section")
},
data() {
return {