Skip to content

Instantly share code, notes, and snippets.

@vladimirlukyanov
Last active November 8, 2023 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vladimirlukyanov/28144f3daacfcc6fe7fb6444a8ddb631 to your computer and use it in GitHub Desktop.
Save vladimirlukyanov/28144f3daacfcc6fe7fb6444a8ddb631 to your computer and use it in GitHub Desktop.
webpack hot reload disable nuxt
// Add this to nuxt.config.js
build: {
publicPath: '/zenith/',
analyze: false,
hotMiddleware : {
reload:false
},
// watch: ['api', 'modules'],
extend(config, {isDev, isClient}) {
config.output.publicPath = '/zenith/';
config.entry[0] = 'webpack-hot-middleware/client?name=client&reload=false&timeout=30000&path=/__webpack_hmr';
},
}
@patau23
Copy link

patau23 commented Sep 1, 2023

what does this code do?

@vladimirlukyanov
Copy link
Author

what does this code do?

Ойбой !
This code is old one – inside hotMiddleware, you can see that reload is set to false. This will disable hot-reloading for your Nuxt project 👋

@patau23
Copy link

patau23 commented Nov 8, 2023

what does this code do?

Ойбой ! This code is old one – inside hotMiddleware, you can see that reload is set to false. This will disable hot-reloading for your Nuxt project 👋

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment