chore: frappe-ui tree shaking changes

This commit is contained in:
Jannat Patel
2025-11-26 15:06:21 +05:30
parent 3be3124951
commit 924a11e4f4
8 changed files with 21 additions and 22 deletions

View File

@@ -1,7 +1,5 @@
import { io } from 'socket.io-client'
import { socketio_port } from '../../../../sites/common_site_config.json'
import { getCachedListResource } from 'frappe-ui/src/resources/listResource'
import { getCachedResource } from 'frappe-ui/src/resources/resources'
export function initSocket() {
let host = window.location.hostname
@@ -14,15 +12,5 @@ export function initSocket() {
withCredentials: true,
reconnectionAttempts: 5,
})
socket.on('refetch_resource', (data) => {
if (data.cache_key) {
let resource =
getCachedResource(data.cache_key) ||
getCachedListResource(data.cache_key)
if (resource) {
resource.reload()
}
}
})
return socket
}