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

Live reloading and static dir change #215

Open
mattstyles opened this issue Aug 11, 2017 · 1 comment
Open

Live reloading and static dir change #215

mattstyles opened this issue Aug 11, 2017 · 1 comment

Comments

@mattstyles
Copy link

budo src/index.js --live --dir=src

If you're serving a static src/index.html file then budo serves that just fine but the live reload js file from the default static file isn't included and it doesn’t seem to be running on 35729 so my browser live-reload plugin can't pick up a server to listen to.

I created a repo that exhibits this.

console output for budo suggests live-reload is running somewhere:

[0000] info  Server running at http://169.254.249.217:9966/ (connect)
[0000] info  LiveReload running

budo@9 tells me LiveReload is running on the standard port and my browser has no issues connecting to it, this is only an issue with budo@10

In case it makes any difference I'm using node@8

Happy to dig in to this but not exactly sure where to start, I'm guessing with budo's live-reload implementation?

@mattdesl
Copy link
Owner

Sorry about the delay, this got lost in my inbox.

It's most likely because the HTML is just a single <script> tag, not a HTML document. You should either use a proper HTML doc with <html>...</html> or wrap your script tag in a body:

<body><script src='./index.js'></script></body>

I think there should also be a way to fix your use case by modifying inject-lr-script, I'd be open to PRs.

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

2 participants