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

ember: a live reload refresh is triggered whenever any file changes #84

Open
johncowen opened this issue Mar 18, 2021 · 1 comment
Open
Labels
Type: Bug Something isn't working

Comments

@johncowen
Copy link
Contributor

We are using docfy embedded alongside/inside our application, which also uses CSS hot reloading.

Changes to any CSS related files (including our app.scss file) causes full page refresh instead of waiting for a re-injection of the CSS via hot reloading.

I traced back to the below lines that are causing the full refresh, which I'm guessing runs when any file in the application changes and modifies/touches the public/docfy-urls.json file, which in turn causes the app/browser to refresh.

const urlsJsonFile = path.join(
this.outputPath,
'public',
'docfy-urls.json'
);
ensureDirectoryExistence(urlsJsonFile);
fs.writeFileSync(
urlsJsonFile,
JSON.stringify(result.content.map((page) => page.meta.url))
);

If there's nothing I can change outside of docfy to prevent this, I'd be happy to try and look at this myself with some info/guidance/direction on what a fix could be if that's easiest?

@josemarluedke josemarluedke added the Type: Bug Something isn't working label Mar 18, 2021
@josemarluedke
Copy link
Owner

Interesting. I think we need to introduce some type of caching using Broccoli. We probably should also avoid rebuilding Docfy if no markdown files changed, this could be the ultimate solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants