stackjlei
stackjlei

Reputation: 10035

Where does webpack place its output for webpack dev server to use?

I see in the output directory of the manifest json that states what files were produced by my webpack, but I'm curious where are those files actually located? Where does webpack dev server go to locate these files and then serve them?

Upvotes: 3

Views: 533

Answers (1)

Juan Rivas
Juan Rivas

Reputation: 603

webpack-dev-server runs in memory so the files are not available for the user. However, they implemented a feature to write the files to disk in the version 3.1.10 by adding writeToDisk option to your webpack configuration object

devServer: {
  writeToDisk: true
}

You could also use webpack --watch command to serve files from your build directory.

Upvotes: 2

Related Questions