As per default , webpack devServer will serve bundle in-memory (session) without writing to disk i.e.:
TIP : the following
writeToDisk: false
is suitable for development mode specifically !
...,
devMiddleware: {
...,
writeToDisk: false, /* default : serve in-memory only */
...,
},
...,
Served in-memory & written in-disk (persistency) with respect to any changes within your code base made whilst developing :
...,
devMiddleware: {
...,
writeToDisk: true, /*serve in-memory as you did before but save to disk as well (changes to file[s] respected) */
...,
},
...,
NOTE :
writeToDisk:<value=false|true>
becomes quite useless if explicitly bundled with(npx) webpack bundle
prior to any serving done !
Top comments (0)