Skip to content
Snippets Groups Projects
Verified Commit b2acd1e8 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Use specific methods from lodash to reduce bundle size

parent 17d86a28
No related branches found
No related tags found
No related merge requests found
Showing
with 33 additions and 19 deletions
......@@ -52,7 +52,7 @@
<script>
import axios from 'axios'
import _ from 'lodash'
import _ from '@/lodash'
import {mapState} from 'vuex'
import { WebSocketBridge } from 'django-channels'
import GlobalEvents from '@/components/utils/global-events'
......
......@@ -24,7 +24,7 @@
</template>
<script>
import _ from "lodash"
import _ from "@/lodash"
export default {
props: {
......
......@@ -29,7 +29,7 @@
</template>
<script>
import _ from 'lodash'
import _ from '@/lodash'
import axios from 'axios'
import logger from '@/logging'
import AlbumCard from '@/components/audio/album/Card'
......
......@@ -4,7 +4,7 @@
<script>
import {mapState} from 'vuex'
import _ from 'lodash'
import _ from '@/lodash'
import url from '@/utils/url'
import {Howl} from 'howler'
......
......@@ -36,7 +36,7 @@
</template>
<script>
import _ from 'lodash'
import _ from '@/lodash'
import axios from 'axios'
import PlayButton from '@/components/audio/PlayButton'
......
......@@ -47,7 +47,7 @@
</template>
<script>
import _ from 'lodash'
import _ from '@/lodash'
import axios from 'axios'
import PlayButton from '@/components/audio/PlayButton'
......@@ -109,7 +109,7 @@ export default {
</script>
<style scoped lang="scss">
@import '../../../style/vendor/media';
@import "../../../style/vendor/media";
.play-overlay {
position: absolute;
......
......@@ -26,7 +26,7 @@
</template>
<script>
import _ from 'lodash'
import _ from '@/lodash'
import axios from 'axios'
import LibraryCard from '@/views/content/remote/Card'
......
......@@ -61,7 +61,7 @@
</template>
<script>
import _ from 'lodash'
import _ from '@/lodash'
import axios from 'axios'
import logger from '@/logging'
......
......@@ -69,7 +69,7 @@
</template>
<script>
import _ from "lodash"
import _ from "@/lodash"
import axios from "axios"
import logger from "@/logging"
import backend from "@/audio/backend"
......
......@@ -70,7 +70,7 @@
<script>
import axios from "axios"
import _ from "lodash"
import _ from "@/lodash"
import $ from "jquery"
import logger from "@/logging"
......
......@@ -123,6 +123,7 @@
</template>
<script>
import _ from "@/lodash"
import $ from "jquery";
import axios from "axios";
import logger from "@/logging";
......
......@@ -92,7 +92,7 @@
<script>
import axios from "axios"
import _ from "lodash"
import _ from "@/lodash"
import $ from "jquery"
import logger from "@/logging"
......
......@@ -94,7 +94,7 @@
<script>
import axios from "axios"
import $ from "jquery"
import _ from "lodash"
import _ from "@/lodash"
import BuilderFilter from "./Filter"
import TrackTable from "@/components/audio/track/Table"
import RadioButton from "@/components/radios/Button"
......
......@@ -64,7 +64,7 @@
<script>
import axios from 'axios'
import $ from 'jquery'
import _ from 'lodash'
import _ from '@/lodash'
import Modal from '@/components/semantic/Modal'
import TrackTable from '@/components/audio/track/Table'
......
......@@ -106,7 +106,7 @@
<script>
import axios from 'axios'
import _ from 'lodash'
import _ from '@/lodash'
import time from '@/utils/time'
import Pagination from '@/components/Pagination'
import ActionTable from '@/components/common/ActionTable'
......
......@@ -86,7 +86,7 @@
<script>
import axios from 'axios'
import moment from 'moment'
import _ from 'lodash'
import _ from '@/lodash'
import Pagination from '@/components/Pagination'
import ActionTable from '@/components/common/ActionTable'
import OrderingMixin from '@/components/mixins/Ordering'
......
......@@ -96,7 +96,7 @@
<script>
import axios from 'axios'
import _ from 'lodash'
import _ from '@/lodash'
import time from '@/utils/time'
import Pagination from '@/components/Pagination'
import ActionTable from '@/components/common/ActionTable'
......
......@@ -67,7 +67,7 @@
</template>
<script>
import _ from 'lodash'
import _ from '@/lodash'
import axios from 'axios'
import {mapState} from 'vuex'
......
......@@ -15,7 +15,7 @@
</template>
<script>
import _ from 'lodash'
import _ from '@/lodash'
import axios from 'axios'
import PlaylistCard from '@/components/playlists/Card'
......
// cherry-pick specific lodash methods here to reduce bundle size
export default {
clone: require('lodash/clone'),
debounce: require('lodash/debounce'),
get: require('lodash/get'),
merge: require('lodash/merge'),
range: require('lodash/range'),
shuffle: require('lodash/shuffle'),
sortBy: require('lodash/sortBy'),
throttle: require('lodash/throttle'),
uniq: require('lodash/uniq'),
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment