提交 c73f7d6a 编写于 作者: T Tomáš Witek 提交者: Arunoda Susiripala

Unlink only pages bundle in dev env (#4015)

* Unlink only pages bundle in dev env

* Use IS_BUNDLED_PAGE regexp for unlink file plugin
上级 f0308687
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册