mirror of
https://github.com/tl-open-source/tl-rtc-file.git
synced 2025-10-23 23:23:06 +08:00
tl-rtc-file
This commit is contained in:
14
build/webpack/plugin/deleteCssJs.js
Normal file
14
build/webpack/plugin/deleteCssJs.js
Normal file
@@ -0,0 +1,14 @@
|
||||
class DeleteCssJs {
|
||||
apply(compiler) {
|
||||
compiler.hooks.emit.tapAsync(this.constructor.name, (compilation, callback) => {
|
||||
compilation.getAssets().forEach((asset) => {
|
||||
const pathname = asset.name;
|
||||
if(pathname.includes('cssJsDist')){
|
||||
delete compilation.assets[asset.name];
|
||||
}
|
||||
})
|
||||
callback()
|
||||
})
|
||||
}
|
||||
}
|
||||
module.exports = DeleteCssJs;
|
Reference in New Issue
Block a user