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 reload without bundling? #245

Open
spacejack opened this issue Aug 18, 2019 · 1 comment
Open

Live reload without bundling? #245

spacejack opened this issue Aug 18, 2019 · 1 comment

Comments

@spacejack
Copy link
Contributor

I'm using this command:

budo -p 3000 --dir public --live=*.{html,js,css}

CSS files are in public/css/ and JS files are in public/js/. The page itself is at public/index.html.

I see updates when edits are made to index.html and css files, but not for the JS files. Is there a way to get it to refresh the page when JS sources are changed?

Also, I'm using <script type="module" src="js/main.js"></script>. Although it doesn't seem to work with a plain old <script src="js/main.js"> either.

I also get the following warning which is a bit of an annoyance since it's not correct, but I can live with it...

NOTE: It looks like you are using budo without a JavaScript entry.
  This is fine, but if you were trying to bundle the "*.{html,js,css}" file,
  you should re-arrange your arguments like so:

      budo *.{html,js,css} --live
@spacejack
Copy link
Contributor Author

Ugh, I did figure it out finally. It is a bit frustrating that the most obvious simple case is not very intuitive. I needed the command:

budo -p 3000 --dir public --wg **/*.{html,css,js} --live

And the warning goes away as well.

Here's a sample project using this setup.

One strange thing is that the first edit I make to the JS file is not picked up. I have to shift-reload once, then after that budo's live reload seems to work from that point on.

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

1 participant