diff --git a/main.config.js b/main.config.js index db3f3f1..3b40396 100644 --- a/main.config.js +++ b/main.config.js @@ -23,28 +23,6 @@ const css = { preprocessor: 'less' } -/** - * DEVSERVER CONFIGURATION - */ -const devServer = { - // Port used by the dev server - port: 8080, - - // Use this option if you already have a local environment (like MAMP) - // e.g. proxy: website.dev - // don't forget to rename config.localhost.php if you use a vhost - proxy: false, - - // The alias/path to the php binary. OSX has PHP available natively. - // You have to edit this to have the devServer working on Windows. - // Use the proxy opt if you can't use / don't want to use a built-in php serv. - phpBinary: 'php', - - // Set this to true to display PHP logs in your terminal - // /!\ does nothing if you use the `proxy` option - logPhpErrors: true -} - /** * FOLDER ARCHITECTURE * All paths used in kirby-webpack. @@ -77,6 +55,33 @@ paths.kirby = { widgets: path.join(paths.www, 'site', 'widgets') } +/** + * DEVSERVER CONFIGURATION + */ +const devServer = { + // Port used by the dev server + port: 8080, + + // Use this option if you already have a local environment (like MAMP) + // e.g. proxy: website.dev + // don't forget to rename config.localhost.php if you use a vhost + proxy: false, + + // The alias/path to the php binary. OSX has PHP available natively. + // You have to edit this to have the devServer working on Windows. + // Use the proxy opt if you can't use / don't want to use a built-in php serv. + phpBinary: 'php', + + // Set this to true to display PHP logs in your terminal + // /!\ does nothing if you use the `proxy` option + logPhpErrors: true, + + // Force browserSync to not watch some specific files/folder + ignored: [ + path.join(paths.kirby.plugins, 'page-lock') + ] +} + // the appEnv variable can be used to create environment-specific behaviours // By default, appEnv can be one of those three values: // - development (via npm run start) diff --git a/scripts/webpack-serve.js b/scripts/webpack-serve.js index ae0a733..c6cd831 100644 --- a/scripts/webpack-serve.js +++ b/scripts/webpack-serve.js @@ -143,7 +143,7 @@ function browserSyncInit () { path.join(user.paths.www, 'site', 'cache', '**/*'), path.join(user.paths.www, 'site', 'accounts', '**/*'), path.join(user.paths.www, 'thumbs', '**/*') - ] + ].concat(user.devServer.ignored) } }, (error, instance) => { if (error) throw error