提交 f014d409 编写于 作者: fxy060608's avatar fxy060608

refactor(v3): entry

上级 794e11d4
......@@ -20,8 +20,9 @@ class WebpackAppPlusPlugin {
const chunkVersions = {}
const isAppService = compiler.options.entry['app-service']
const isAppView = compiler.options.entry['app-view']
const entry = compiler.options.entry()
const isAppService = entry['app-service']
const isAppView = entry['app-view']
compiler.hooks.beforeCompile.tapAsync('WebpackAppPlusPlugin', (params, callback) => {
isAppService && (serviceCompiled = false)
......@@ -29,11 +30,11 @@ class WebpackAppPlusPlugin {
callback()
})
compiler.hooks.emit.tapAsync('WebpackAppPlusPlugin', (compilation, callback) => {
compiler.hooks.emit.tapAsync('WebpackAppPlusPlugin', (compilation, callback) => {
isAppService && (serviceChangedFiles.length = 0)
isAppView && (viewChangedFiles.length = 0)
isAppView && (viewChangedFiles.length = 0)
const changedChunks = compilation.chunks.filter(chunk => {
const oldVersion = chunkVersions[chunk.name]
chunkVersions[chunk.name] = chunk.hash
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册