-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Webpack-dev-server serves a directory list instead of the app page #538
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
Have you tried running it without the |
I'm getting the same view.
|
@KevinHoughton, you'll get that if there is no |
I am having the same problem in the latest version. The In my webpack.config.js (this worked fine before the update):
Now it only works when I specify the contentBase as a command line argument:
|
I'm closing this issue because of inactivity. Feel free to comment, and we can always re-open it again. |
I have a very similar problem. Is this an issue with webpack? |
Same issue as well |
@alexlevy0 please avoid posting "same" or "me too" comments on a thread. Rather, use the reaction button an add a thumbs-up reaction to the OP or another comment. See here for more information on reactions. |
SpaceK33z answer was solution, when i faced similar problem, which got introduced with file structure reorganization, i moved everything under a src folder which was outside. I moved index.html outside and that worked. Alternative solution use html-webpack-plugin. |
can confirm that this way it works im actually using |
My Web app config :
`var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: [
'webpack-dev-server/client?http://127.0.0.1:8080',
'webpack/hot/only-dev-server',
'./src/index.jsx'
],
output: {
path: path.join(__dirname,'public'),
filename: 'bundle.js',
publicPath: 'http://localhost:8080'
},
devServer: {
contentBase: "./public",
hot: true
},
resolve: {
modulesDirectories: ['node_modules','src'],
extensions: ['','.js']
},
module: {
loaders: [
{
test: /.jsx?$/,
exclude: /node_modules/,
loaders: ['react-hot','babel?presets[]=react,presets[]=react,presets[]=es2015']
}
};

`
This is my directory structure :
Please help me with this as i am not able to see my index.html. Is there something wrong with my config file
The text was updated successfully, but these errors were encountered: