diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte index 2aea31857e..a40ec2a45b 100644 --- a/packages/bbui/src/Table/Table.svelte +++ b/packages/bbui/src/Table/Table.svelte @@ -3,8 +3,7 @@ import "@spectrum-css/table/dist/index-vars.css" import CellRenderer from "./CellRenderer.svelte" import SelectEditRenderer from "./SelectEditRenderer.svelte" - import { cloneDeep } from "lodash" - import { deepGet } from "../helpers" + import { cloneDeep, deepGet } from "../helpers" /** * The expected schema is our normal couch schemas for our tables. diff --git a/packages/bbui/src/helpers.js b/packages/bbui/src/helpers.js index e80db76537..cf40e12d74 100644 --- a/packages/bbui/src/helpers.js +++ b/packages/bbui/src/helpers.js @@ -98,3 +98,11 @@ export const deepSet = (obj, key, value) => { } obj[split[split.length - 1]] = value } + +/** + * Deeply clones an object. Functions are not supported. + * @param obj the object to clone + */ +export const cloneDeep = obj => { + return JSON.parse(JSON.stringify(obj)) +} diff --git a/packages/client/.gitignore b/packages/client/.gitignore index 1947eba17b..9f84a3631d 100644 --- a/packages/client/.gitignore +++ b/packages/client/.gitignore @@ -2,4 +2,5 @@ node_modules package-lock.json release/ -dist/ \ No newline at end of file +dist/ +stats.html \ No newline at end of file diff --git a/packages/client/package.json b/packages/client/package.json index c5c9386694..095ff5cb50 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -22,15 +22,6 @@ "@budibase/bbui": "^1.0.58-alpha.5", "@budibase/frontend-core": "^1.0.58-alpha.5", "@budibase/string-templates": "^1.0.58-alpha.5", - "regexparam": "^1.3.0", - "rollup-plugin-polyfill-node": "^0.8.0", - "shortid": "^2.2.15", - "svelte-spa-router": "^3.0.5" - }, - "devDependencies": { - "@rollup/plugin-alias": "^3.1.5", - "@rollup/plugin-commonjs": "^18.0.0", - "@rollup/plugin-node-resolve": "^11.2.1", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", @@ -41,8 +32,18 @@ "@spectrum-css/vars": "^3.0.1", "apexcharts": "^3.22.1", "dayjs": "^1.10.5", - "fs-extra": "^8.1.0", - "jsdom": "^16.0.1", + "regexparam": "^1.3.0", + "rollup-plugin-polyfill-node": "^0.8.0", + "shortid": "^2.2.15", + "svelte": "^3.38.2", + "svelte-apexcharts": "^1.0.2", + "svelte-flatpickr": "^3.1.0", + "svelte-spa-router": "^3.0.5" + }, + "devDependencies": { + "@rollup/plugin-alias": "^3.1.5", + "@rollup/plugin-commonjs": "^18.0.0", + "@rollup/plugin-node-resolve": "^11.2.1", "postcss": "^8.2.10", "rollup": "^2.44.0", "rollup-plugin-json": "^4.0.0", @@ -50,9 +51,7 @@ "rollup-plugin-svelte": "^7.1.0", "rollup-plugin-svg": "^2.0.0", "rollup-plugin-terser": "^7.0.2", - "svelte": "^3.38.2", - "svelte-apexcharts": "^1.0.2", - "svelte-flatpickr": "^3.1.0" + "rollup-plugin-visualizer": "^5.5.4" }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" } diff --git a/packages/client/rollup.config.js b/packages/client/rollup.config.js index 1aee91df42..5206b63884 100644 --- a/packages/client/rollup.config.js +++ b/packages/client/rollup.config.js @@ -8,6 +8,7 @@ import svg from "rollup-plugin-svg" import json from "rollup-plugin-json" import nodePolyfills from "rollup-plugin-polyfill-node" import path from "path" +import { visualizer } from "rollup-plugin-visualizer" const production = !process.env.ROLLUP_WATCH const ignoredWarnings = [ @@ -79,6 +80,7 @@ export default { svg(), json(), production && terser(), + !production && visualizer(), ], watch: { clearScreen: false, diff --git a/packages/client/src/components/Component.svelte b/packages/client/src/components/Component.svelte index f43c2b30ec..78fff52426 100644 --- a/packages/client/src/components/Component.svelte +++ b/packages/client/src/components/Component.svelte @@ -1,10 +1,15 @@