question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hot reload doesn't normal work without --temp .temp

See original GitHub issue
  • I confirm that this is an issue rather than a question.

Bug report

If you do not set --temp .temp, hot reload can only reload markdown, but can not reload config.js files, navigation bar, sidebar title, front matter, etc.

Version

Steps to reproduce

  1. npm install -g vuepress@next
  2. echo '# Hello VuePress!' > README.md
  3. Create file .vuepress/config.js
module.exports = {
  themeConfig: {
    nav: [
      { text: 'home', link: '/' }
    ],
    sidebarDepth: 2,
    sidebar: {
      '/': [
        ['', 'home']
      ]
    }
  }
}
  1. vuepress dev .
  2. Edit file .vuepress/config.js
module.exports = {
  themeConfig: {
    nav: [
      { text: 'home', link: '/' }
    ],
    sidebarDepth: 2,
    sidebar: {
      '/': [
        ['', 'newHome']
      ]
    }
  }
}

What is expected?

sidebar title 'home to newHome

What is actually happening?

no change

Other relevant information

Websocket connection is normal.

  • Your OS: Windows 10
  • Node.js version: v11.2.0
  • Browser version: Google Chrome 73.0.3683.103
  • Is this a global or local install? global
  • Which package manager did you use for the install? npm 6.4.1
  • Does this issue occur when all plugins are disabled? yes

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
AJLoveChinacommented, Apr 29, 2019

@Xinyii 非常感谢你提供的帮助vuepress dev . --temp .temp,它确实可行。 在这之前,我在官方文档中找不到这行命令的说明,我被sidebar无法自动更新的问题困扰了很久。

在0.x的版本中,sidebar自动更新是可以正常工作的。 但是当我切换到1.x版本之后,sidebar就无法自动更新了

我特地制作了一个Gif图,希望它对你们有帮助。 vue-press-sidebar-bug3

2reactions
ulivzcommented, Apr 14, 2019

Since you’re using a globally installed vuepress, the temp files will be placed under the global installed directory so that VuePress cannot detect the change of it.


BTW, the docs has been updated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

flutter - My values are being loaded only after hot reloading
I am relatively new to flutter and dart. When I run the code, the app builds and instead of showing the three values...
Read more >
Edit running code with Hot Reload - JetBrains Rider
Hot Reload, also known as Edit & Continue. Learn how to make changes while running and debugging without restarting the session.
Read more >
Solution for Webpack 5 Dev Server Not Live Reloading
If you have all those things in your project and your dev server is is not live reloading, this video might give you...
Read more >
HotSwap: Bringing hot code reloading to Buck
Buck then copies the remaining code to a temporary directory on the device, and the skeleton app will load that code after launch....
Read more >
Difference Between Hot Reload and Hot Restart in Flutter
Hot Reload does not work when Enumerated types are changed to regular Classes and when classes are changed to enumerated types.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found