Skip to content

Commit

Permalink
feat: add support for manual chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
eshankvaish committed Dec 1, 2024
1 parent bd6ecae commit c4963ee
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 29 deletions.
48 changes: 24 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "1.1.6",
"version": "1.1.6-beta-2",
"description": "Supporting common component library",
"type": "module",
"main": "dist/index.js",
Expand Down Expand Up @@ -60,11 +60,8 @@
"husky": "^7.0.4",
"lint-staged": "^12.5.0",
"moment": "^2.29.4",
"monaco-editor": "0.44.0",
"monaco-yaml": "5.1.1",
"prettier": "^3.1.1",
"react-ga4": "^1.4.1",
"react-mde": "^11.5.0",
"react-toastify": "9.1.3",
"typescript": "5.5.4",
"vite": "5.4.11",
Expand All @@ -79,11 +76,14 @@
"@rjsf/validator-ajv8": "^5.13.3",
"@typeform/embed-react": "2.20.0",
"dompurify": "^3.0.2",
"monaco-editor": "0.44.0",
"monaco-yaml": "5.1.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-draggable": "^4.4.5",
"react-ga4": "^1.4.1",
"react-mde": "^11.5.0",
"react-monaco-editor": "^0.54.0",
"react-router-dom": "^5.3.0",
"react-select": "5.8.0",
"rxjs": "^7.8.1",
Expand All @@ -99,7 +99,6 @@
"jsonpath-plus": "^10.0.0",
"react-dates": "^21.8.0",
"react-diff-viewer-continued": "^3.4.0",
"react-monaco-editor": "^0.54.0",
"sass": "^1.69.7",
"tslib": "2.7.0"
},
Expand Down
44 changes: 44 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,50 @@ export default defineConfig({
output: {
assetFileNames: 'assets/[name][extname]',
entryFileNames: '[name].js',
manualChunks(id: string) {
if (
id.includes('/node_modules/monaco-editor') ||
id.includes('/node_modules/react-monaco-editor')
) {
return '@monaco-editor'
}

if (id.includes('/node_modules/react-dates')) {
return '@react-dates'
}

if (id.includes('/node_modules/framer-motion')) {
return '@framer-motion'
}

if (id.includes('/node_modules/moment')) {
return '@moment'
}

if (id.includes('/node_modules/react-select')) {
return '@react-select'
}

if (id.includes('/node_modules/')) {
return '@vendor'
}

if (id.includes('src/Common/CodeEditor')) {
return '@code-editor'
}

if (id.includes('src/Common/RJSF')) {
return '@common-rjsf'
}

if (id.includes('src/Assets/Icons')) {
return '@src-assets-icons'
}

if (id.includes('src/Assets/Img')) {
return '@src-assets-images'
}
}
},
},
},
Expand Down

0 comments on commit c4963ee

Please sign in to comment.