node_modules

This commit is contained in:
saeid
2019-07-15 13:07:31 +04:30
parent d3735c6d30
commit ce1a3ebf9c
35713 changed files with 3639219 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
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