diff --git a/src/server.js b/src/server.js index 2b382a020..fa4b4f252 100644 --- a/src/server.js +++ b/src/server.js @@ -295,21 +295,6 @@ function start(opts) { } if (options.serveAllStyles) { - fs.readdir(options.paths.styles, { withFileTypes: true }, (err, files) => { - if (err) { - return; - } - for (const file of files) { - if (file.isFile() && path.extname(file.name).toLowerCase() == '.json') { - const id = path.basename(file.name, '.json'); - const item = { - style: file.name, - }; - addStyle(id, item, false, false); - } - } - }); - const watcher = chokidar.watch( path.join(options.paths.styles, '*.json'), {},