mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 14:48:41 +00:00
19 lines
374 B
JavaScript
19 lines
374 B
JavaScript
const chunks = [
|
|
'index',
|
|
'index-legacy',
|
|
'chunk-async',
|
|
'chunk-async-legacy',
|
|
'immutable-chunk',
|
|
'immutable-chunk-legacy',
|
|
'polyfills-legacy',
|
|
]
|
|
|
|
export function fn() {
|
|
return Promise.all(
|
|
chunks.map(async (name) => {
|
|
const response = await fetch(`/assets/${name}.js`)
|
|
return `${name}: ${response.headers.get('Content-Type')}`
|
|
}),
|
|
)
|
|
}
|