Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchOptions doesn't work #7420

Open
Elrinth opened this issue Aug 26, 2023 · 2 comments
Open

watchOptions doesn't work #7420

Elrinth opened this issue Aug 26, 2023 · 2 comments

Comments

@Elrinth
Copy link

Elrinth commented Aug 26, 2023

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? #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.
- 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)
@daneren2005
Copy link

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.

@lizouzt
Copy link

lizouzt commented Jan 24, 2024

A piece of fucking shit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants