Remove the admin folder (front-end part of a plugin) from the files to watch so webpack so we can have hot reload with webpack

This commit is contained in:
soupette 2018-07-13 14:04:06 +02:00
parent 3890bc1211
commit ad72a4f66d

View File

@ -66,7 +66,8 @@ module.exports = function(appPath = '') {
}; };
const setFilesToWatch = (src) => { const setFilesToWatch = (src) => {
var files = fs.readdirSync(src); var files = _.includes(src, '/admin') || _.includes(src, 'components') ? [] : fs.readdirSync(src);
_.forEach(files, file => { _.forEach(files, file => {
if ( if (
_.startsWith(file, '.') || _.startsWith(file, '.') ||