Skip to content

Commit

Permalink
feat: Splitting chunks to reduce bundle size
Browse files Browse the repository at this point in the history
  • Loading branch information
matvp91 committed Oct 12, 2024
1 parent f67afea commit 555cacf
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 103 deletions.
1 change: 0 additions & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export default defineConfig({
{
text: "Miscellaneous",
items: [
{ text: "Beta features", link: "misc/beta-features" },
{ text: "Contribute", link: "misc/contribute" },
{ text: "Tips", link: "misc/tips" },
{ text: "Credits", link: "misc/credits" },
Expand Down
11 changes: 0 additions & 11 deletions docs/misc/beta-features.md

This file was deleted.

1 change: 1 addition & 0 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"scripts": {
"dev": "bun run ./src/index.ts --watch",
"build": "bun build ./src/index.ts --target=bun --outdir=./dist",
"lint": "eslint \"./src/**/*.ts\" && prettier --check \"./src/**/*.ts\"",
"typecheck": "tsc"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/artisan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"type": "module",
"scripts": {
"dev": "bun --watch ./src/index.ts",
"build": "bun build ./src/index.ts --target=bun --outdir=./dist",
"lint": "eslint \"./src/**/*.ts\" && prettier --check \"./src/**/*.ts\"",
"typecheck": "tsc",
"compile": "./scripts/compile.sh"
"typecheck": "tsc"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.623.0",
Expand Down
13 changes: 0 additions & 13 deletions packages/artisan/scripts/compile.sh

This file was deleted.

74 changes: 0 additions & 74 deletions packages/artisan/scripts/install.sh

This file was deleted.

3 changes: 1 addition & 2 deletions packages/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
"tailwind-merge": "^2.4.0",
"tailwindcss-animate": "^1.0.7",
"timeago.js": "4.0.0-beta.3",
"uniqolor": "^1.1.1",
"zod": "^3.23.8"
"uniqolor": "^1.1.1"
},
"devDependencies": {
"@mixwave/shared": "workspace:*",
Expand Down
16 changes: 16 additions & 0 deletions packages/dashboard/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ import { loadConfigEnv } from "@mixwave/shared";

loadConfigEnv();

const MANUAL_CHUNKS = [
"hls.js",
"monaco-editor",
"radix-ui",
"react-syntax-highlighter",
];

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
Expand All @@ -22,4 +29,13 @@ export default defineConfig({
server: {
port: 52000,
},
build: {
rollupOptions: {
output: {
manualChunks: (id) => {
return MANUAL_CHUNKS.find((chunk) => id.includes(chunk));
},
},
},
},
});
1 change: 1 addition & 0 deletions packages/stitcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"type": "module",
"scripts": {
"dev": "bun --watch ./src/index.ts",
"build": "bun build ./src/index.ts --target=bun --outdir=./dist",
"test": "bun test",
"lint": "eslint \"./src/**/*.ts\" && prettier --check \"./src/**/*.ts\"",
"typecheck": "tsc"
Expand Down

0 comments on commit 555cacf

Please sign in to comment.