From ab36f26e94b76feb9791bf883d81b67e5a5aedd1 Mon Sep 17 00:00:00 2001 From: Damian Stasik <920747+damianstasik@users.noreply.github.com> Date: Mon, 16 Oct 2023 23:13:20 +0200 Subject: [PATCH] Optimize backend bundle --- backend/src/artist/index.ts | 2 +- backend/src/auth/index.ts | 2 +- backend/src/playlist/index.ts | 1 - backend/src/track/index.ts | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/src/artist/index.ts b/backend/src/artist/index.ts index 166b71fc..281f2abe 100644 --- a/backend/src/artist/index.ts +++ b/backend/src/artist/index.ts @@ -3,7 +3,7 @@ import { router } from '..'; import { procedureWithAuthToken } from '../auth/middleware'; import { getSpotifyApi } from '../spotify'; import { concatLimit } from 'async'; -import { shuffle } from 'lodash'; +import shuffle from 'lodash/shuffle'; import { mixpanel } from '../mixpanel'; export const artistRouter = router({ diff --git a/backend/src/auth/index.ts b/backend/src/auth/index.ts index 5d2306e9..c0765b90 100644 --- a/backend/src/auth/index.ts +++ b/backend/src/auth/index.ts @@ -4,7 +4,7 @@ import { router, procedure } from '..'; import { getSpotifyApi } from '../spotify'; import { procedureWithAuthToken, withAuthToken } from './middleware'; import * as jwt from 'jsonwebtoken'; -import { isPast } from 'date-fns'; +import isPast from 'date-fns/isPast'; import { mixpanel } from '../mixpanel'; function to( diff --git a/backend/src/playlist/index.ts b/backend/src/playlist/index.ts index fc58231c..0a62fcbf 100644 --- a/backend/src/playlist/index.ts +++ b/backend/src/playlist/index.ts @@ -2,7 +2,6 @@ import { router } from '..'; import { getSpotifyApi } from '../spotify'; import { procedureWithAuthToken } from '../auth/middleware'; import { z } from 'zod'; -import { chunk } from 'lodash'; import { mixpanel } from '../mixpanel'; export const playlistRouter = router({ diff --git a/backend/src/track/index.ts b/backend/src/track/index.ts index cc4c454a..9772d191 100644 --- a/backend/src/track/index.ts +++ b/backend/src/track/index.ts @@ -2,7 +2,7 @@ import { ee, router } from '..'; import { getSpotifyApi } from '../spotify'; import { procedureWithAuthToken } from '../auth/middleware'; import { z } from 'zod'; -import { chunk } from 'lodash'; +import chunk from 'lodash/chunk'; import { mixpanel } from '../mixpanel'; export const trackRouter = router({