mirror of
https://github.com/primer/css.git
synced 2024-12-12 10:47:14 +03:00
Merge pull request #879 from primer/fix-bundle-size-report
Fix bundle size report
This commit is contained in:
commit
9efaffad61
@ -44,10 +44,15 @@ Promise.all(
|
||||
const entry = {
|
||||
name: bundle.name,
|
||||
path: bundle.css,
|
||||
local: require(`../${bundle.stats}`)
|
||||
local: require(`../${bundle.stats}`),
|
||||
remote: {}
|
||||
}
|
||||
return fetch(unpkgBaseURL + bundle.stats)
|
||||
.then(res => res.json())
|
||||
.catch(error => {
|
||||
console.warn(`Unable to fetch old ${bundle.name} bundle from unpkg; assuming it's new!`)
|
||||
return entry.local
|
||||
})
|
||||
.then(stats => (entry.remote = stats))
|
||||
.then(() => entry)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user