mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 20:31:05 +03:30
16 lines
468 B
JavaScript
Vendored
16 lines
468 B
JavaScript
Vendored
const { get } = require('lodash')
|
|
|
|
function isCssOnlyEmission(stats) {
|
|
const assetsStatsMapping = get(stats, 'compilation.assets', {})
|
|
const assetsNames = Object.keys(assetsStatsMapping)
|
|
|
|
return (
|
|
assetsNames
|
|
.map(assetName => ({ name: assetName, wasEmitted: get(assetsStatsMapping, [assetName, 'emitted'], false) }))
|
|
.filter(asset => asset.wasEmitted)
|
|
.every(asset => asset.name.includes('.css'))
|
|
)
|
|
}
|
|
|
|
module.exports = isCssOnlyEmission
|