Remove @/lodash.js

Vite handles tree shaking out of the box, so cherry picking modules is
now pointless
This commit is contained in:
Kasper Seweryn 2022-02-21 22:49:02 +01:00
parent db86483fbc
commit 80ed06db04
No known key found for this signature in database
GPG Key ID: B2BA6FA597595C00
57 changed files with 56 additions and 79 deletions

View File

@ -48,7 +48,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import { mapState, mapGetters } from 'vuex'
import { WebSocketBridge } from 'django-channels'
import GlobalEvents from '@/components/utils/global-events.vue'

View File

@ -250,7 +250,7 @@
<script>
import { mapState } from 'vuex'
import _ from '@/lodash'
import _ from 'lodash'
import showdown from 'showdown'
import { humanSize } from '@/filters'

View File

@ -434,7 +434,7 @@ We render some markdown to html here, the content is set by the admin so we shou
<script>
import { mapState } from 'vuex'
import _ from '@/lodash'
import _ from 'lodash'
import showdown from 'showdown'
export default {

View File

@ -213,7 +213,7 @@
<script>
import { mapState } from 'vuex'
import ThemesMixin from '@/components/mixins/Themes.vue'
import _ from '@/lodash'
import _ from 'lodash'
export default {
mixins: [ThemesMixin],

View File

@ -325,7 +325,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import { mapState } from 'vuex'
import showdown from 'showdown'
import AlbumWidget from '@/components/audio/album/Widget.vue'

View File

@ -37,7 +37,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
export default {
props: {

View File

@ -345,7 +345,7 @@
import { mapState, mapGetters, mapActions } from 'vuex'
import $ from 'jquery'
import moment from 'moment'
import lodash from '@/lodash'
import lodash from 'lodash'
import time from '@/utils/time.js'
import { createFocusTrap } from 'focus-trap'
import TrackFavoriteIcon from '@/components/favorites/TrackFavoriteIcon.vue'

View File

@ -107,7 +107,7 @@
<script>
import Modal from '@/components/semantic/Modal.vue'
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
export default {
components: {

View File

@ -157,7 +157,7 @@
<script>
import axios from 'axios'
import lodash from '@/lodash'
import lodash from 'lodash'
import SignupFormBuilder from '@/components/admin/SignupFormBuilder.vue'
export default {

View File

@ -161,7 +161,7 @@
</template>
<script>
import lodash from '@/lodash'
import lodash from 'lodash'
import SignupForm from '@/components/auth/SignupForm.vue'

View File

@ -54,7 +54,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import axios from 'axios'
import PodcastTable from '@/components/audio/podcast/Table.vue'
import TrackTable from '@/components/audio/track/Table.vue'

View File

@ -53,7 +53,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import axios from 'axios'
import ChannelSerieCard from '@/components/audio/ChannelSerieCard.vue'
import AlbumCard from '@/components/audio/album/Card.vue'

View File

@ -37,7 +37,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import axios from 'axios'
import ChannelCard from '@/components/audio/ChannelCard.vue'

View File

@ -106,7 +106,7 @@
<script>
import { mapState } from 'vuex'
import _ from '@/lodash'
import _ from 'lodash'
export default {
props: {

View File

@ -345,7 +345,7 @@ import { mapState, mapGetters, mapActions } from 'vuex'
import GlobalEvents from '@/components/utils/global-events.vue'
import { toLinearVolumeScale } from '@/audio/volume.js'
import { Howl, Howler } from 'howler'
import _ from '@/lodash'
import _ from 'lodash'
import url from '@/utils/url'
import axios from 'axios'
import VolumeControl from './VolumeControl.vue'

View File

@ -69,7 +69,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import axios from 'axios'
import logger from '@/logging'
import AlbumCard from '@/components/audio/album/Card.vue'

View File

@ -23,7 +23,7 @@
<script>
import jQuery from 'jquery'
import router from '@/router'
import lodash from '@/lodash'
import lodash from 'lodash'
import GlobalEvents from '@/components/utils/global-events.vue'
export default {

View File

@ -158,7 +158,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import axios from 'axios'
import TrackRow from '@/components/audio/track/Row.vue'
import TrackMobileRow from '@/components/audio/track/MobileRow.vue'

View File

@ -135,7 +135,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import axios from 'axios'
import PlayButton from '@/components/audio/PlayButton.vue'
import TagsList from '@/components/tags/List.vue'

View File

@ -119,7 +119,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import axios from 'axios'
import TranslationsMixin from '@/components/mixins/Translations.vue'

View File

@ -166,7 +166,7 @@
<script>
import axios from 'axios'
import lodash from '@/lodash'
import lodash from 'lodash'
import showdown from 'showdown'
export default {
props: {

View File

@ -53,7 +53,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import axios from 'axios'
import LibraryCard from '@/views/content/remote/Card.vue'

View File

@ -249,7 +249,7 @@
<script>
import axios from 'axios'
import lodash from '@/lodash'
import lodash from 'lodash'
import PlayButton from '@/components/audio/PlayButton.vue'
import TagsList from '@/components/tags/List.vue'
import ArtistLabel from '@/components/audio/ArtistLabel.vue'

View File

@ -240,7 +240,7 @@
<script>
import $ from 'jquery'
import _ from '@/lodash.js'
import _ from 'lodash'
import axios from 'axios'
import AttachmentInput from '@/components/common/AttachmentInput.vue'
import EditList from '@/components/library/EditList.vue'

View File

@ -42,7 +42,7 @@
</template>
<script>
import _ from '@/lodash.js'
import _ from 'lodash'
import axios from 'axios'
import EditCard from '@/components/library/EditCard.vue'

View File

@ -311,7 +311,7 @@
</template>
<script>
import _ from '@/lodash.js'
import _ from 'lodash'
import axios from 'axios'
import FileUploadWidget from './FileUploadWidget.vue'
import FsBrowser from './FsBrowser.vue'

View File

@ -20,7 +20,7 @@
<script>
import $ from 'jquery'
import lodash from '@/lodash.js'
import lodash from 'lodash'
export default {
props: { value: { type: Array, required: true } },
watch: {

View File

@ -186,7 +186,7 @@
<script>
import axios from 'axios'
import $ from 'jquery'
import _ from '@/lodash'
import _ from 'lodash'
import BuilderFilter from './Filter.vue'
import TrackTable from '@/components/audio/track/Table.vue'
import RadioButton from '@/components/radios/Button.vue'

View File

@ -107,7 +107,7 @@
<script>
import axios from 'axios'
import $ from 'jquery'
import _ from '@/lodash'
import _ from 'lodash'
import Modal from '@/components/semantic/Modal.vue'
import TrackTable from '@/components/audio/track/Table.vue'

View File

@ -201,7 +201,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import { normalizeQuery, parseTokens } from '@/search'
import Pagination from '@/components/Pagination.vue'

View File

@ -186,7 +186,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import { normalizeQuery, parseTokens } from '@/search'
import Pagination from '@/components/Pagination.vue'

View File

@ -185,7 +185,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import { normalizeQuery, parseTokens } from '@/search'
import Pagination from '@/components/Pagination.vue'

View File

@ -131,7 +131,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import Pagination from '@/components/Pagination.vue'
import OrderingMixin from '@/components/mixins/Ordering.vue'

View File

@ -216,7 +216,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import { normalizeQuery, parseTokens } from '@/search'
import Pagination from '@/components/Pagination.vue'

View File

@ -147,7 +147,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import { normalizeQuery, parseTokens } from '@/search'
import Pagination from '@/components/Pagination.vue'

View File

@ -199,7 +199,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import { normalizeQuery, parseTokens } from '@/search'
import Pagination from '@/components/Pagination.vue'

View File

@ -308,7 +308,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import { normalizeQuery, parseTokens } from '@/search'
import Pagination from '@/components/Pagination.vue'

View File

@ -172,7 +172,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import { normalizeQuery, parseTokens } from '@/search'
import Pagination from '@/components/Pagination.vue'

View File

@ -183,7 +183,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import Pagination from '@/components/Pagination.vue'
import ActionTable from '@/components/common/ActionTable.vue'

View File

@ -169,7 +169,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
export default {
props: {

View File

@ -158,7 +158,7 @@
<script>
import axios from 'axios'
import moment from 'moment'
import _ from '@/lodash'
import _ from 'lodash'
import Pagination from '@/components/Pagination.vue'
import ActionTable from '@/components/common/ActionTable.vue'
import OrderingMixin from '@/components/mixins/Ordering.vue'

View File

@ -200,7 +200,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import Pagination from '@/components/Pagination.vue'
import ActionTable from '@/components/common/ActionTable.vue'

View File

@ -26,7 +26,7 @@
<script>
import TranslationsMixin from '@/components/mixins/Translations.vue'
import lodash from '@/lodash'
import lodash from 'lodash'
export default {
mixins: [TranslationsMixin],
props: {

View File

@ -59,7 +59,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import axios from 'axios'
import PlaylistCard from '@/components/playlists/Card.vue'

View File

@ -22,7 +22,7 @@
<script>
import lodash from '@/lodash'
import lodash from 'lodash'
export default {
props: {
customRadioId: { type: Number, required: false, default: null },

View File

@ -1,23 +0,0 @@
// cherry-pick specific lodash methods here to reduce bundle size
export default {
clone: require('lodash/clone'),
cloneDeep: require('lodash/cloneDeep'),
keys: require('lodash/keys'),
debounce: require('lodash/debounce'),
get: require('lodash/get'),
set: require('lodash/set'),
merge: require('lodash/merge'),
range: require('lodash/range'),
shuffle: require('lodash/shuffle'),
sortBy: require('lodash/sortBy'),
throttle: require('lodash/throttle'),
uniq: require('lodash/uniq'),
remove: require('lodash/remove'),
reverse: require('lodash/reverse'),
isEqual: require('lodash/isEqual'),
sum: require('lodash/sum'),
startCase: require('lodash/startCase'),
tap: require('lodash/tap'),
trim: require('lodash/trim')
}

View File

@ -1,7 +1,7 @@
import Vue from 'vue'
import axios from 'axios'
import logger from '@/logging'
import lodash from '@/lodash'
import lodash from 'lodash'
function getDefaultScopedTokens () {
return {

View File

@ -1,6 +1,6 @@
import axios from 'axios'
import logger from '@/logging'
import _ from '@/lodash'
import _ from 'lodash'
function getDefaultUrl () {
return (

View File

@ -1,6 +1,6 @@
import axios from 'axios'
import logger from '@/logging'
import _ from '@/lodash'
import _ from 'lodash'
export default {
namespaced: true,

View File

@ -1,5 +1,5 @@
import logger from '@/logging'
import _ from '@/lodash'
import _ from 'lodash'
export default {
namespaced: true,

View File

@ -1,4 +1,4 @@
import lodash from '@/lodash'
import lodash from 'lodash'
export function setUpdate (obj, statuses, value) {
const updatedKeys = lodash.keys(obj)

View File

@ -568,7 +568,7 @@
<script>
import axios from 'axios'
import logger from '@/logging'
import lodash from '@/lodash'
import lodash from 'lodash'
import $ from 'jquery'
import InstancePolicyForm from '@/components/manage/moderation/InstancePolicyForm.vue'

View File

@ -61,7 +61,7 @@
</template>
<script>
import _ from '@/lodash'
import _ from 'lodash'
import axios from 'axios'
export default {

View File

@ -458,7 +458,7 @@
<script>
import axios from 'axios'
import lodash from '@/lodash'
import lodash from 'lodash'
import InstancePolicyForm from '@/components/manage/moderation/InstancePolicyForm.vue'
import InstancePolicyCard from '@/components/manage/moderation/InstancePolicyCard.vue'

View File

@ -127,7 +127,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import Pagination from '@/components/Pagination.vue'
import OrderingMixin from '@/components/mixins/Ordering.vue'

View File

@ -125,7 +125,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import Pagination from '@/components/Pagination.vue'
import OrderingMixin from '@/components/mixins/Ordering.vue'

View File

@ -267,7 +267,7 @@
<script>
import axios from 'axios'
import _ from '@/lodash'
import _ from 'lodash'
import time from '@/utils/time.js'
import { normalizeQuery, parseTokens } from '@/search'