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.

Watch mode not reloading

See original GitHub issue

I’m trying to implement this project in my development flow, but without the watch mode will be almost impossible to check the component changes.

I’ve created an example based on https://github.com/ui-jar/ui-jar/issues/34, you can check the repo https://github.com/picheli20/ui-jar/commit/b7b38bc12e39b3c5cd31d8684a2ec9bc64f39504

    "ui-jar": "node node_modules/ui-jar/dist/bin/cli.js --directory ./src/app/ --includes \\.ts$",
    "docs:watch": "npm run ui-jar -- --watch",
    "start-ui-jar-example": "concurrently \"npm run docs:watch\" \"ng serve ui-jar\""

Basically just adding --watch doesn’t trigger the live-reload at all, if you edit any component description will not change.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
nordingcommented, Nov 1, 2018

Just just one question out of curiosity, the watch mode just rebuild the testing component (what I could see), is there a way to reload for any changes related to what component?

The reason that the watcher only listening on changes in test files is because of performance. If the watcher listening on all files changes it will have to rebuild every time a change is triggered - and a rebuild build take some time. The downside with the watcher not listening on all file changes is that your @description, @component and @group annotation won’t update without a rebuild. I recommend to do a full rebuild on that kind of changes.

UI-jar only import your components files, hence it doesn’t need to rebuild every time a change is triggered in your component files (as your ordinary build system will trigger on that changes and rebuild the component file that UI-jar imports).

0reactions
picheli20commented, Nov 19, 2018

@Maks-Yaremenko is what @nording said here: https://github.com/ui-jar/ui-jar/issues/47#issuecomment-435166690

At the moment is just reloading the tests, not the components, I’ve done as a temporary solution is comment out the rebuild filter, so you can re-load the components, till figure out a better solution 😃 You can check this commit: https://github.com/picheli20/ui-jar/commit/d4d83ba800e7939af0aef32e129b1fc3d721983a#diff-44c164274b5283acdd8c52f95daee66fL49

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack --watch isn't compiling changed files - Stack Overflow
First reload was completed in console output, but bundle.js was not updated. On second reload it got stuck on "Checking started in a...
Read more >
Webpack 5 watch mode does not trigger compilation when ...
There is a bug related to the dev server not recompiling when a node_modules/monorepo-linked-package is updating, requiring to run yarn start ...
Read more >
Watch and WatchOptions | webpack
Webpack can watch files and recompile whenever they change. This page explains how to enable this and a couple of tweaks you can...
Read more >
5 Tips to Fix Night Mode Not Working on Apple Watch Ultra
Here are the 5 best tips and tricks to fix Night Mode not working on Apple Watch Ultra. Let's get rid of the...
Read more >
Hot reload | NestJS - A progressive Node.js framework
Hint With Yarn Berry (not classic Yarn), instead of using the nodeExternals in the externals configuration property, use the WebpackPnpExternals from webpack- ...
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