diff --git a/packages/@vue/cli-ui/apollo-server/connectors/locales.js b/packages/@vue/cli-ui/apollo-server/connectors/locales.js index 0d34ea35a8..da8beb206e 100644 --- a/packages/@vue/cli-ui/apollo-server/connectors/locales.js +++ b/packages/@vue/cli-ui/apollo-server/connectors/locales.js @@ -49,8 +49,8 @@ function loadFolder (root, context) { const folder = path.join(root, './locales') if (process.env.VUE_APP_CLI_UI_DEV && !watchedTrees.get(root) && fs.existsSync(folder)) { watchedTrees.set(root, true) - const watch = require('watch') - watch.watchTree(folder, () => { + const chokidar = require('chokidar') + chokidar.watch(folder).on('all', () => { _loadFolder(root, context) log('Locales reloaded', root) }) diff --git a/packages/@vue/cli-ui/package.json b/packages/@vue/cli-ui/package.json index d1c5f0c19f..1c8da062ba 100644 --- a/packages/@vue/cli-ui/package.json +++ b/packages/@vue/cli-ui/package.json @@ -60,8 +60,7 @@ "prismjs": "^1.23.0", "rss-parser": "^3.11.0", "shortid": "^2.2.15", - "typescript": "~4.1.5", - "watch": "^1.0.2" + "typescript": "~4.1.5" }, "devDependencies": { "@babel/core": "^7.12.16", @@ -75,6 +74,7 @@ "ansi_up": "^5.0.0", "apollo-client": "^2.6.10", "apollo-link": "^1.2.14", + "chokidar": "^3.5.2", "core-js": "^3.8.3", "cross-env": "^7.0.3", "date-fns": "^2.17.0", diff --git a/yarn.lock b/yarn.lock index 51da8cf58a..2e70b1ca63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7128,7 +7128,7 @@ chokidar@3.5.1: optionalDependencies: fsevents "~2.3.1" -chokidar@3.5.2, "chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.2.2, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1: +chokidar@3.5.2, "chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.2.2, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1, chokidar@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==