From ba1deaa12a38667db16ed48af98350e1b42e02ae Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Tue, 1 Dec 2020 16:11:49 +0800 Subject: [PATCH] fix(cli): webpack watch ignored --- packages/vue-cli-plugin-uni/lib/util.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/vue-cli-plugin-uni/lib/util.js b/packages/vue-cli-plugin-uni/lib/util.js index 549d3e8602..a78357f7cb 100644 --- a/packages/vue-cli-plugin-uni/lib/util.js +++ b/packages/vue-cli-plugin-uni/lib/util.js @@ -1,3 +1,4 @@ +const path = require('path') let partialIdentifier = false module.exports = { getPartialIdentifier () { @@ -21,10 +22,11 @@ module.exports = { return { ignored: [ /node_modules/, - /unpackage/, - /uniCloud/i, - /cloudfunctions-aliyun/, - /cloudfunctions-tcb/ + path.resolve(process.env.UNI_INPUT_DIR, 'unpackage'), + path.resolve(process.env.UNI_INPUT_DIR, 'uniCloud-aliyun'), + path.resolve(process.env.UNI_INPUT_DIR, 'uniCloud-tcb'), + path.resolve(process.env.UNI_INPUT_DIR, 'cloudfunctions-aliyun'), + path.resolve(process.env.UNI_INPUT_DIR, 'cloudfunctions-tcb') ] } } -- GitLab