html-webpack-plugin currently generates the following:
<script type="text/javascript" src="booking.js"></script>
This doesn't work for HTML 5mode enabled in our SPA with the current configuration. So, basically, if we reload the page at "fake" url "/foo/bar" and src is like above, booking.js will be served at "/foo/bar/index.html".
Now, if we have the leading slash, like so:
<script type="text/javascript" src="/booking.js"></script>
The index file would be served at /.
use publicPath: '/'
https://webpack.js.org/guides/public-path/#components/sidebar/sidebar.jsx
@mastilver Oh, thanks a lot! I am new to Webpack, just switched our configuration from a bunch of gulp scripts to a Webpack one, so I am still not familiar with some basic stuff. Thanks again.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
use
publicPath: '/'https://webpack.js.org/guides/public-path/#components/sidebar/sidebar.jsx