-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
devServer can not show html but dir, with module.exports=array #2977
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
Comments
Again - with normal reproducible test repo (you can create git repo and provide example of the problem), I can't help you having only part of configurations, I will reopen it when you fix it |
thank you, this is my first issue:) now, this is my git: https://github.com/lornally/weppackserveissue |
how about it? do you need me push more? |
|
thank you:) |
do you really try this? this can not fix the bug. i have push it in git : https://github.com/lornally/weppackserveissue |
What do you want? It shows |
# with this, http://localhost:8080/ allways show dir / , this is wrong
# i have up pic to git: https://raw.githubusercontent.com/lornally/weppackserveissue/main/printscreen/devserver.png
devServer:
contentBase: './dist/html'
publicPath: '/dist/html'
# if export this http://localhost:8080/ is right show index.ejs, this is right
# i have up pic to git: https://raw.githubusercontent.com/lornally/weppackserveissue/main/printscreen/show_index.png
module.exports= html
# if export this http://localhost:8080/ is only show dir ./, this is wrong
# i have up pic to git: https://raw.githubusercontent.com/lornally/weppackserveissue/main/printscreen/array_show_dir.png
module.exports = [ cmd, html ] if you can not see the pic, pls down it from git |
|
thank you very much, but i got this error:
|
|
wow, thank you so much, "site" is key setting for this, thank you again, and where i can find relative doc for this? |
https://webpack.js.org/api/cli/#configuration-options maybe we need couple examples, feel free to send a PR |
really really thank you for your patient and time, thank you:) |
Uh oh!
There was an error while loading. Please reload this page.
Code
Expected Behavior
http://localhost:8080/ show '~/', it should show the index.html of the website.
Actual Behavior
when i use "webpack serve", http://localhost:8080/ only show: '~/' (the blank directory)
For Bugs; How can we reproduce the behavior?
webpack serve
visit: http://localhost:8080/
ref: devServer can not show html but dir, with module.exports=array webpack#12499
The text was updated successfully, but these errors were encountered: