Skip to content

Commit

Permalink
GH-1239: Use dynamic import in router to reduce chunk size.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Nov 24, 2023
1 parent d78d952 commit 6ad3aa0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
8 changes: 4 additions & 4 deletions leshan-bsserver-demo/webapp/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

import Vue from "vue";
import VueRouter from "vue-router";
import Bootstrap from "../views/Bootstrap.vue";
import About from "@leshan-server-core-demo/views/About.vue";
import Client from "../views/Client.vue";
import Server from "@leshan-server-core-demo/views/Server.vue";
const Bootstrap = () => import("../views/Bootstrap.vue");
const About = () => import("@leshan-server-core-demo/views/About.vue");
const Client = () => import("../views/Client.vue");
const Server = () => import("@leshan-server-core-demo/views/Server.vue");

Vue.use(VueRouter);

Expand Down
18 changes: 10 additions & 8 deletions leshan-server-demo/webapp/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@

import Vue from "vue";
import VueRouter from "vue-router";
import Clients from "../views/Clients.vue";
import Client from "../views/Client.vue";
import CompositeOperationView from "../views/CompositeOperationView.vue";
import CompositeObjectView from "../views/CompositeObjectView.vue";
import ObjectView from "../views/ObjectView.vue";

import Security from "../views/Security.vue";
import Server from "@leshan-server-core-demo/views/Server.vue";
import About from "@leshan-server-core-demo/views/About.vue";
const Clients = () => import("../views/Clients.vue");
const Client = () => import("../views/Client.vue");
const CompositeOperationView = () =>
import("../views/CompositeOperationView.vue");
const CompositeObjectView = () => import("../views/CompositeObjectView.vue");
const ObjectView = () => import("../views/ObjectView.vue");

const Security = () => import("../views/Security.vue");
const Server = () => import("@leshan-server-core-demo/views/Server.vue");
const About = () => import("@leshan-server-core-demo/views/About.vue");

Vue.use(VueRouter);

Expand Down

0 comments on commit 6ad3aa0

Please sign in to comment.