I'd like to ignore a folder which I create folders and images inside whenever I create a product. I don't want the whole website to reload because of that whenever I'm developing... Therefore I wish watchOptions with ignore worked. Like webpack!
Here's maybe something related? https://github.com/vuejs/vue-cli/issues/2725
Currently it complains like this:
INFO Starting development server...
ERROR ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
options has an unknown property 'watchOptions'. These properties are valid:
object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
options has an unknown property 'watchOptions'. These properties are valid:
object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
at validate (C:\dev\web\quasar\node_modules\webpack-dev-server\node_modules\schema-utils\dist\validate.js:158:11)
at new Server (C:\dev\web\quasar\node_modules\webpack-dev-server\lib\Server.js:270:5)
at serve (C:\dev\web\quasar\node_modules\@vue\cli-service\lib\commands\serve.js:194:20)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
I noticed the same thing and it has blocked me from upgrading to Vue CLI 5/Webpack 5. I doubt this is ever going to be fixed though. This whole CLI tool has been abandoned in favor of Vite.
What problem does this feature solve?
I'd like to ignore a folder which I create folders and images inside whenever I create a product. I don't want the whole website to reload because of that whenever I'm developing... Therefore I wish watchOptions with ignore worked. Like webpack! Here's maybe something related? https://github.com/vuejs/vue-cli/issues/2725
What does the proposed API look like?
module.exports = { //... watchOptions: { ignored: ['/files//*.js', '**/node_modules'], }, };
Currently it complains like this: INFO Starting development server... ERROR ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.