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.

Inline mode in HTML does not work

See original GitHub issue

I’m using v1.14.1. Webpack creates my js/bundle.js and copies a bunch of HTML files, including a root index.html using file-loader. As startup command I use

webpack-dev-server --inline --hot --content-base build/

Everything works fine and I can access the site at http://localhost:8080/. Now when I make a change in the original HTML file (in the folder from where file-loader copied it), this does not trigger an automatic refresh. But it does trigger a rebuild. So when I manually refresh the page I can see the change.

It looks like something goes wrong with the automatic refresh. The documentation of automatic refresh only says that “There is also the option to add a reference to the webpack-dev-server client script to the HTML page”.

Is the referenced http://localhost:8080/webpack-dev-server.js supposed to be injected by the server? But even if I add it manually to index.html, the automatic refresh does not work.

What am I doing wrong?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
stephanloughcommented, Jul 6, 2016

Check your loader tests. If you do something too permissive like {test: /^(?!.*\.(jsx?|css|html)$)/i, loader: 'file-loader'}, something in the socket reloader chain will accidentally run through file-loader and reloading will break without an explicit error.

1reaction
maiertechcommented, Jun 9, 2016

Some more insight after playing around. When starting webpack-dev-server with

webpack-dev-server --content-base build/ --hot --inline

HMR works fine, but automatic refresh for HTML pages does not work. When I remove the --hot option and start webpack with

webpack-dev-server --content-base build/ --inline

automatic refresh for HTML pages works fine and also refresh for JavaScript. Obviously for JavaScript it’s not a hot reload.

Any idea why --hot breaks the HTML auto refresh and is there a way to get both auto refresh for HTML and HMR working, @sokra?

Read more comments on GitHub >

github_iconTop Results From Across the Web

display:inline property not working
I have tested it on all browsers and this is working. Anyway if you have been suffering from this problem add display: inline-block; ......
Read more >
Inline elements - HTML: HyperText Markup Language | MDN
Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the...
Read more >
TinyMCE inline option not working? FAQs and Solution
The main reason for the TinyMCE inline option not working is that a textarea element doesn't work with inline mode.
Read more >
HTML Block and Inline Elements
An inline element does not start on a new line. An inline element only takes up as much width as necessary. This is...
Read more >
When do you use inline-block?
The block-direction margin on inline elements is ignored entirely; The padding on inline elements doesn't affect the height of the line of text....
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