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

chore(cli): add watch ignored

上级 46f4834b
......@@ -314,7 +314,8 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
assetFilter (assetFilename) {
return !(/\.map$/.test(assetFilename)) && !(/vendor/.test(assetFilename))
}
}
},
watchOptions: require('./util').getWatchOptions()
}, platformWebpackConfig)
}
}
......@@ -154,7 +154,10 @@ module.exports = {
'vue-style-loader': resolve('packages/h5-vue-style-loader')
}
},
plugins
plugins,
devServer: {
watchOptions: require('../util').getWatchOptions()
}
}
},
chainWebpack (webpackConfig, vueOptions, api) {
......
const path = require('path')
let partialIdentifier = false
module.exports = {
getPartialIdentifier () {
......@@ -16,5 +17,17 @@ module.exports = {
getAutomatorCode () {
const automator = `@dcloudio/uni-${process.env.UNI_SUB_PLATFORM || process.env.UNI_PLATFORM}/dist/automator`
return process.env.UNI_AUTOMATOR_WS_ENDPOINT ? `import '${automator}';` : ''
},
getWatchOptions () {
return {
ignored: [
/node_modules/,
path.resolve(process.env.UNI_INPUT_DIR, 'unpackage'),
path.resolve(process.env.UNI_INPUT_DIR, 'uniCloud'),
path.resolve(process.env.UNI_INPUT_DIR, 'unicloud'),
path.resolve(process.env.UNI_INPUT_DIR, 'cloudfunctions-aliyun'),
path.resolve(process.env.UNI_INPUT_DIR, 'cloudfunctions-tcb')
]
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册