Skip to content

Commit

Permalink
chore: Update npm dependencies and add analyze script
Browse files Browse the repository at this point in the history
  • Loading branch information
d-beezee committed Oct 17, 2024
1 parent 79b0ba6 commit 4623daa
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"main": "build/index.js",
"types": "build/index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"build": "vite build",
Expand All @@ -14,7 +13,8 @@
"type:check": "tsc",
"dev": "vite",
"start": "vite",
"lint": "eslint --ext .tsx,.ts ."
"lint": "eslint --ext .tsx,.ts .",
"analyze": "npx vite-bundle-visualizer"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -54,7 +54,6 @@
"@tiptap/react": "2.2.4",
"@tiptap/starter-kit": "2.2.4",
"@tiptap/suggestion": "2.2.4",
"@types/react-slick": "^0.23.10",
"@zendeskgarden/container-utilities": "^2.0.0",
"@zendeskgarden/css-bedrock": "^9.0.0",
"@zendeskgarden/react-accordions": "8.76.8",
Expand All @@ -63,8 +62,8 @@
"@zendeskgarden/react-buttons": "8.76.8",
"@zendeskgarden/react-chrome": "8.76.8",
"@zendeskgarden/react-colorpickers": "8.76.8",
"@zendeskgarden/react-dropdowns.next": "^8.76.8",
"@zendeskgarden/react-dropdowns": "8.76.8",
"@zendeskgarden/react-dropdowns.next": "^8.76.8",
"@zendeskgarden/react-forms": "8.76.8",
"@zendeskgarden/react-grid": "8.76.8",
"@zendeskgarden/react-loaders": "8.76.8",
Expand Down Expand Up @@ -105,6 +104,7 @@
"@types/node": "^20.14.2",
"@types/react": "^17.0.0 || ^18.0.0",
"@types/react-dom": "^17.0.0 || ^18.0.0",
"@types/react-slick": "^0.23.10",
"@types/react-window": "^1.8.5",
"@types/ua-parser-js": "^0.7.36",
"@types/uuid": "^9.0.8",
Expand All @@ -129,6 +129,7 @@
"styled-components": "6.1.1",
"typescript": "^4.5.0",
"vite": "^5.2.13",
"vite-plugin-chunk-split": "^0.5.0",
"vite-plugin-dts": "^4.2.3",
"vite-plugin-lib-inject-css": "^2.1.1",
"vite-tsconfig-paths": "^4.3.2",
Expand Down Expand Up @@ -165,8 +166,6 @@
]
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0",
"@types/react-dom": "^17.0.0 || ^18.0.0",
"@zendeskgarden/react-theming": "^8.48.2",
"formik": "^2.2.9",
"react": "^17.0.0 || ^18.0.0",
Expand Down
17 changes: 9 additions & 8 deletions vite.config.ts → vite.config.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import react from "@vitejs/plugin-react";
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { chunkSplitPlugin } from "vite-plugin-chunk-split";
import dts from "vite-plugin-dts";
import { libInjectCss } from "vite-plugin-lib-inject-css";
import pkg from "./package.json";

import {
Plugin,
Expand All @@ -16,34 +19,32 @@ export default defineConfig(({ mode }) => {
setEnv(mode);
return {
build: {
sourcemap: "inline",
...(mode === "development" ? { emptyOutDir: false } : {}),
outDir: "build",
lib: {
entry: resolve(__dirname, "src/index.tsx"),
formats: ["es"],
},
rollupOptions: {
external: [
"react",
"react-dom",
"styled-components",
"react/jsx-runtime",
// "@zendeskgarden/react-dropdowns",
"formik",
],
external: [...Object.keys(pkg.peerDependencies)],
output: {
assetFileNames: "assets/[name][extname]",
entryFileNames: "[name].js",
},
},
},
plugins: [
react(),
svgrPlugin(),
libInjectCss(),
dts({
include: ["src"],
...(mode === "development" ? {} : { rollupTypes: true }),
}),
chunkSplitPlugin({
strategy: "unbundle",
}),
],
};
});
Expand Down
16 changes: 15 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5815,7 +5815,7 @@ es-iterator-helpers@^1.0.19:
iterator.prototype "^1.1.3"
safe-array-concat "^1.1.2"

es-module-lexer@^1.2.1, es-module-lexer@^1.5.0:
es-module-lexer@^1.2.1, es-module-lexer@^1.4.1, es-module-lexer@^1.5.0:
version "1.5.4"
resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78"
integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==
Expand Down Expand Up @@ -6769,6 +6769,11 @@ import-lazy@~4.0.0:
resolved "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153"
integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==

import-meta-resolve@^4.0.0:
version "4.1.0"
resolved "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz#f9db8bead9fafa61adb811db77a2bf22c5399706"
integrity sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==

imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
Expand Down Expand Up @@ -9766,6 +9771,15 @@ vary@~1.1.2:
resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==

vite-plugin-chunk-split@^0.5.0:
version "0.5.0"
resolved "https://registry.npmjs.org/vite-plugin-chunk-split/-/vite-plugin-chunk-split-0.5.0.tgz#b5da3382f88b50354887560760c8b6bf15295bf8"
integrity sha512-pasNKLhH+ICjoCF6HoKKvgmZ1LEPSCIKAa8Lz0ZpMyQC9bLmCLT7UxgKMULewsc9SUw89OX0udsGiIQCtr8wLA==
dependencies:
es-module-lexer "^1.4.1"
import-meta-resolve "^4.0.0"
magic-string "^0.30.5"

vite-plugin-dts@^4.2.3:
version "4.2.3"
resolved "https://registry.npmjs.org/vite-plugin-dts/-/vite-plugin-dts-4.2.3.tgz#e0d9616eb574700111dbd19ae98e166541433263"
Expand Down

0 comments on commit 4623daa

Please sign in to comment.