Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

No output building template with webpack-dev-server #384

Closed
raygesualdo opened this issue Jul 15, 2016 · 2 comments
Closed

No output building template with webpack-dev-server #384

raygesualdo opened this issue Jul 15, 2016 · 2 comments

Comments

@raygesualdo
Copy link

raygesualdo commented Jul 15, 2016

I'm using a pug/jade template for index.html. If I have an empty build directory, run webpack-dev-server (which handles processing the template), there's no index.html actually output to the build directory. An abbreviated version of my webpack.config.js is below.

const config = {
  entry: 'client/index.jsx',
  output: {
    path: 'build',
    filename: 'bundle.js'
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        loader: 'react-hot!babel',
        exclude: /node_modules/
      },
      {
        test: /\.pug$/,
        loader: 'jade'
      }
    ]
  },
  plugins: [
    new HtmlWebpackPlugin({
      filename: 'build/index.html',
      template: 'index.pug',
      cache: false
    }),
  ],
  devServer: {
    contentBase: OUTPUT_PATH,
  }
};

This config file works just fine if I run webpack directly. It's when I run webpack-dev-server that nothing is output.

@raygesualdo
Copy link
Author

Nevermind. I found the harddisk plugin which solves this exact problem.

@lock
Copy link

lock bot commented May 31, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant