Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webpack `publicPath`, `path` and webpack-dev-server `contentBase` relationship?

Tags:

What's the relationship between them?

After reading webpack docs. I am still not very clear.

I know output.path clearly.

The docs say that webpack-dev-server will serve the bundle files in memory. So, what's the contentBase property meaning?

and what's the relationship with publicPath?

like image 583
slideshowp2 Avatar asked Oct 17 '16 04:10

slideshowp2


1 Answers

It seems no relationship

"publicPath" is "URL path where the webpack files are served from", just like a url-prefix

"contentBase" is "the directory to serve files non-webpack files from", serve file not generate by webpack

More other info is here: webpack-dev-server option

like image 143
jfw10973 Avatar answered Oct 03 '22 18:10

jfw10973