diff --git a/server/build/plugins/unlink-file-plugin.js b/server/build/plugins/unlink-file-plugin.js index bc419f78..b25d4356 100644 --- a/server/build/plugins/unlink-file-plugin.js +++ b/server/build/plugins/unlink-file-plugin.js @@ -1,5 +1,6 @@ import { join } from 'path' import { unlink } from 'mz/fs' +import { IS_BUNDLED_PAGE } from '../../utils' export default class UnlinkFilePlugin { constructor () { @@ -9,7 +10,7 @@ export default class UnlinkFilePlugin { apply (compiler) { compiler.plugin('after-emit', (compilation, callback) => { const removed = Object.keys(this.prevAssets) - .filter((a) => !compilation.assets[a]) + .filter((a) => IS_BUNDLED_PAGE.test(a) && !compilation.assets[a]) this.prevAssets = compilation.assets