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

hotOnly option is not working #12597

Closed
nuong opened this issue Feb 5, 2021 · 6 comments
Closed

hotOnly option is not working #12597

nuong opened this issue Feb 5, 2021 · 6 comments

Comments

@nuong
Copy link

nuong commented Feb 5, 2021

Bug report

What is the current behavior?
Cannot start webpack-dev-server if set hotOnly true
Error:

[webpack-cli] Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
 - configuration has an unknown property 'hotOnly'. These properties are valid:
   object { bonjour?, client?, compress?, dev?, firewall?, headers?, historyApiFallback?, host?, hot?, http2?, https?, injectClient?, injectHot?, liveReload?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, openPage?, overlay?, port?, proxy?, public?, setupExitSignals?, static?, stdin?, transportMode?, useLocalIp? }
npm ERR! code ELIFECYCLE
npm ERR! errno 2

If the current behavior is a bug, please provide the steps to reproduce.
Use webpack 5: webpack@5.11.0 and webpack-dev-server@4.0.0-beta.0
Enable hotOnly option:

devServer: {
    hotOnly: true
},

What is the expected behavior?

Other relevant information:
webpack version: webpack@5.11.0
Node.js version: v14.15.1
Operating System: MacOS
Additional tools:

@webpack-bot
Copy link
Contributor

For maintainers only:

  • webpack-4
  • webpack-5
  • bug
  • critical-bug
  • enhancement
  • documentation
  • performance
  • dependencies
  • question

@alexander-akait
Copy link
Member

Use hot: 'only', it is in CHANGELOG

@nolimitdev
Copy link

@DrThuraya
Copy link

Use hot: 'only', it is in CHANGELOG

Hi @alexander-akait ,

I upgrade node to 10.20 and npm to 6.14 and the ERROR message had changed!
newerrormessage
when looking to fix this error, many persons recommend to change the "webpack.config.js" file, However, I didn't find this file in my directory https://github.com/DrThouraya/regards-frontend/tree/master/webapp.

Thanks for your help!
PS: I didn't found the last post so I write for you here..Thank you!

@alexander-akait
Copy link
Member

Some developers use more complex webpack configuration names, in your case - webpack.*.*.js, you can found a lot of them here https://github.com/DrThouraya/regards-frontend/tree/master/webapp

From your error report - https://github.com/DrThouraya/regards-frontend/blob/master/webapp/webpack.dev.preprod.config.js config was used, but looks you have configuration for webpack dev server v3, I am afraid I can't help here, because maintenance of these packages should do migration, there are a lot of other options for v3, I recommend to open issue in https://github.com/RegardsOss/regards-frontend and ask developer about v4 migration

@DrThuraya
Copy link

Thanks a lot @alexander-akait. I texted to one of the developers!

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

5 participants