MCPcopy
hub / github.com/wdjungst/react-project / getAssetPaths

Function getAssetPaths

modules/PublicServerAPI.js:175–184  ·  view source on GitHub ↗
(stats, regex)

Source from the content-addressed store, hash-verified

173}
174
175function getAssetPaths(stats, regex) {
176 return Object.keys(stats.assetsByChunkName).reduce((assets, key) => {
177 const chunk = stats.assetsByChunkName[key]
178 const chunkArray = Array.isArray(chunk) ? chunk : [ chunk ]
179 return assets.concat(chunkArray
180 .filter(asset => (regex).test(asset))
181 .map((asset) => stats.publicPath + asset)
182 )
183 }, [])
184}
185
186function getStyleTags(stats) {
187 return getAssetPaths(stats, /\.css$/).map(href => (

Callers 1

PublicServerAPI.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected