File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable react/no-danger */
2
2
import path from 'path'
3
3
import fs from 'fs'
4
- import _ from 'lodash'
4
+ import uniq from 'lodash/uniq'
5
+ import uniqBy from 'lodash/uniqBy'
6
+ import flatMap from 'lodash/flatMap'
5
7
import React from 'react'
6
8
import { invariant , LOADABLE_REQUIRED_CHUNKS_KEY } from './sharedInternals'
7
9
import ChunkExtractorManager from './ChunkExtractorManager'
@@ -17,7 +19,7 @@ function extensionToScriptType(extension) {
17
19
}
18
20
19
21
function getAssets ( chunks , getAsset ) {
20
- return _ . uniqBy ( _ . flatMap ( chunks , chunk => getAsset ( chunk ) ) , 'url' )
22
+ return uniqBy ( flatMap ( chunks , chunk => getAsset ( chunk ) ) , 'url' )
21
23
}
22
24
23
25
function handleExtraProps ( asset , extraProps ) {
@@ -247,7 +249,7 @@ class ChunkExtractor {
247
249
}
248
250
249
251
if ( Array . isArray ( chunks ) ) {
250
- return _ . uniq ( _ . flatMap ( chunks , one ) )
252
+ return uniq ( flatMap ( chunks , one ) )
251
253
}
252
254
253
255
return one ( chunks )
You can’t perform that action at this time.
0 commit comments