Skip to content

Commit

Permalink
fix(alita): 修复每次compiler 丢失图片的bug, 需要重新实现移除的方式
Browse files Browse the repository at this point in the history
  • Loading branch information
ykforerlang committed Dec 11, 2019
1 parent 2887cc6 commit c784a2e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/packByWebpack/ExtractImageFilesPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,19 @@ export default class ExtractImageFilesPlugin {
outFiles[imagePath] = targetPath
}

const fileKeys = Object.keys(outFiles)
// TODO 图片的移除??
/*const fileKeys = Object.keys(outFiles)
console.log('usedImages:', usedImages)
for(let i = 0; i < fileKeys.length; i ++ ) {
const fk = fileKeys[i]
if (!usedImages.has(fk)) {
console.log('fk:', fk)
fse.removeSync(outFiles[fk])
delete outFiles[fk]
}
}
resetUsedImages()
resetUsedImages()*/
})
}
}
Expand Down

0 comments on commit c784a2e

Please sign in to comment.