removed lodash and added lodash-es dependency: now tree shaking on lodash is supported (IMPORTANT: devDependency @rollup/plugin-commonjs need to be at version 11.0.2 to make things work correctly); updated packages
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import _ from 'lodash'
|
||||
import { isEmpty, orderBy } from 'lodash-es'
|
||||
import Vue from 'vue'
|
||||
import { socket } from '../socket.js'
|
||||
import Downloads from '../downloads.js'
|
||||
@@ -73,7 +73,7 @@ const ArtistTab = new Vue({
|
||||
{ title: 'Release Date', sortKey: 'release_date' },
|
||||
{ title: '', width: '32px' }
|
||||
]
|
||||
if (_.isEmpty(releases)) {
|
||||
if (isEmpty(releases)) {
|
||||
this.body = null
|
||||
} else {
|
||||
this.body = releases
|
||||
@@ -82,7 +82,7 @@ const ArtistTab = new Vue({
|
||||
},
|
||||
computed: {
|
||||
showTable() {
|
||||
if (this.body) return _.orderBy(this.body[this.currentTab], this.sortKey, this.sortOrder)
|
||||
if (this.body) return orderBy(this.body[this.currentTab], this.sortKey, this.sortOrder)
|
||||
else return []
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ from 'lodash'
|
||||
import { isEmpty } from 'lodash-es'
|
||||
import Vue from 'vue'
|
||||
import { socket } from '../socket.js'
|
||||
import { showView } from '../tabs.js'
|
||||
@@ -79,7 +79,7 @@ const TracklistTab = new Vue({
|
||||
this.release_date = release_date.substring(0, 10)
|
||||
this.image = cover_xl
|
||||
|
||||
if (_.isEmpty(albumTracks)) {
|
||||
if (isEmpty(albumTracks)) {
|
||||
this.body = null
|
||||
} else {
|
||||
this.body = albumTracks
|
||||
@@ -103,7 +103,7 @@ const TracklistTab = new Vue({
|
||||
this.release_date = creation_date.substring(0, 10)
|
||||
this.metadata = `by ${creatorName} • ${numberOfTracks} songs`
|
||||
|
||||
if (_.isEmpty(playlistTracks)) {
|
||||
if (isEmpty(playlistTracks)) {
|
||||
this.body = null
|
||||
} else {
|
||||
this.body = playlistTracks
|
||||
@@ -129,7 +129,7 @@ const TracklistTab = new Vue({
|
||||
this.release_date = ''
|
||||
this.metadata = `by ${ownerName} • ${numberOfTracks} songs`
|
||||
|
||||
if (_.isEmpty(playlistTracks)) {
|
||||
if (isEmpty(playlistTracks)) {
|
||||
this.body = null
|
||||
} else {
|
||||
this.body = playlistTracks
|
||||
|
||||
Reference in New Issue
Block a user