-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
dev-server not bundling #24
Comments
The webpack-dev-server doesn't write to disk. It serves the result from memory. The line |
Thanks for clearing that up! |
It'd be nice if we could configure webpack-dev-server to also write to disk. It's not that big of performance hit and I've run into a few situations where this would simplify things. |
refs #62 |
+1 thanks @sokra |
So the "watch" functionality is still accomplished only by the We still need to run two commands to get the "live-reload" functionality?
Is that right? |
@WesleyBatista No |
The issue was that the webpack-dev-server seemed to serve the old files instead of the newly bundled ones. The explanation of the solution can be found here: webpack/webpack-dev-server#24 (comment)
@sokra, i have the same problem, run webpack-dev-server, no output files, but when i run webpack, it works,i dont know where i was wrong. below is my webpack.config.js file:
|
@abbymrs, as stated above:
If you still have problems, I'd suggest to create a StackOverflow question. You have a better chance to get help there. |
@SpaceK33z, |
No, but you shouldn't expect that it writes them to disk. The server in webpack-dev-server exposes these files. In your case, the files should be available in |
I got your ideas, thanks. |
I also have the same issue:
But I still get I am using :
what am I missing please? |
I just tried tis , which seam to work :
|
This definitely seems like an awful bug... no error when there's no output, why is webpack such a hairpuller? |
I know this was closed 2014, but it seems that people (including myself) still run into similar issues. Maybe errors or documentation could be improved. Webpack should by default put the user on the path to ensuring that |
Still in 2017 I had same issues. If people still write about an issues, then probably the issues does exist and a proper solution is needed... Temporary solution:
|
This is very poor and much challenging for a new developer. I just lost much time for resolving this issue. I tried every solution available on the web and then I found it's core bug of
|
Yep, I'm also having issues with this. |
The answer was given twice above, if your bundle file is output to
More at the doc: https://webpack.js.org/configuration/output/#output-publicpath |
I was suffering of the same problem, and found the earlier answers – although correct – confusing. Here's how I resolved it: (Tried to write from the viewpoint of the things I was confused about.)
|
I spent half a day for that problem and I finally figured it all out. 🎊 🎆 So if it still does not work for you, here we go. Basically all you need to do if it does not work is to look carefully the output of your webpack-dev-server, especially the colored words. E.g. in my case it was the following (colored words are bold):
So what I see here:
So if you just concatenate those (trimming trailing slash from component Too many config parameters may impact the eventual URL and this is what causes so much confusion. The simplest config would be something like this:
Big part of confusion that webpack-dev-server serves case sensitive URLs, so if your HTML's script tag asks for |
Still seems to be an issue in 2018. All my files are currently in the root directory and the server does not update so for me it is not related to The only fix that works for me is to run |
https://stackoverflow.com/questions/36150456/webpack-dev-server-not-bundling-even-after-showing-bundle-valid-message this posts accepted anwer solved it for me. |
why not just |
I would suggest a much simpler approach:
|
Installing a huge third party dependency is a bad solution to a problem with functionality that should technically already be working. |
is it's not working tho...and browserSync has been a common approach for a long time, if you used to work with gulp or grunt that was the way to sync the browser |
I got it to work by the way, is important to use the
|
I think that's only coincidental, I got it working some time ago without this plugin. |
Hi, I am having issues with setting up webpack. Everything seems to be okay, but the bundle file is not being generated, neither is the HTML file. Here is my webpack.config.js. I'm using webpack 4 const paths = { const htmlPlugin = new HtmlWebpackPlugin({ module.exports = {
}; |
@golddranks This explanation helped a ton thank you |
To run dev-server and --watch at the same time:
Then Verify both dist folder created and http://localhost:8080/ works at the same time. |
It is quite weird, but all I have to do is to change the the output in the following way.
|
What if you want to output more than one file? |
if I remove the bundle and start webpack-dev-server the bundle doesn't appear but the compiler work correctly and the server work without bundle How is that and why I can't find the bundle but every thing is work
|
There's a good chance this is user error, but I cannot get
webpack-dev-server
to update my bundles correctly.I've installed both
webpack
andwebpack-dev-server
globally using npm. I can bundle perfectly fine with thewebpack
command, but thewebpack-dev-server
is not working correctly. The terminal output indicates that the bundle was successful but nothing is written to the file system. The live reload and app status work as intended, but upon reload it serves the contents of the file system which are out of date.Here's a simple example in which I'm having trouble:
index.html
webpack.config.js
src/init.js
webpack-dev-server
output. This does not write anything to the file system.webpack
output. This does write the bundle correctly.I'm running Windows 8.1, and I've tried using older versions (1.2.7 and 1.2.1) of
webpack-dev-server
. Any help would be appreciated!The text was updated successfully, but these errors were encountered: