mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-06-16 23:10:23 -04:00
Move watchOptions into middlewareOptions
This creates middlewareOptions and a check on USE_DOCKER_WATCHOPTIONS as a pathway to have docker containers use polling for file system updates.
This commit is contained in:
parent
1624c92ef4
commit
a76e36054c
1 changed files with 7 additions and 4 deletions
|
@ -21,15 +21,18 @@ routes.forEach(route => {
|
|||
app.get(route.pattern, handler(route));
|
||||
});
|
||||
|
||||
app.use(webpackDevMiddleware(compiler,
|
||||
{
|
||||
var middlewareOptions = {};
|
||||
if (process.env.USE_DOCKER_WATCHOPTIONS) {
|
||||
middlewareOptions = {
|
||||
watchOptions: {
|
||||
aggregateTimeout: 500,
|
||||
poll: 2500,
|
||||
ignored: ['node_modules','build']
|
||||
}
|
||||
}
|
||||
));
|
||||
};
|
||||
}
|
||||
|
||||
app.use(webpackDevMiddleware(compiler, middlewareOptions));
|
||||
|
||||
var proxyHost = process.env.FALLBACK || '';
|
||||
if (proxyHost !== '') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue