diff --git a/dist/favicon.ico b/dist/favicon.ico deleted file mode 100644 index fbfdbe7..0000000 Binary files a/dist/favicon.ico and /dev/null differ diff --git a/src/index.js b/src/index.js index 31f47c6..8c2f1d9 100644 --- a/src/index.js +++ b/src/index.js @@ -36,22 +36,11 @@ export default function serve (options = { contentBase: '' }) { response.writeHead(500) response.end('500 Internal Server Error' + '\n\n' + filePath + - '\n\n' + Object.keys(error).map(function (k) { - return error[k] - }).join('\n') + + '\n\n' + Object.values(error).join('\n') + '\n\n(rollup-plugin-serve)', 'utf-8') return } - if (request.url === '/favicon.ico') { - filePath = resolve(__dirname, '../dist/favicon.ico') - readFile(filePath, function (error, content) { - if (error) { - notFound(response, filePath) - } else { - found(response, filePath, content) - } - }) - } else if (options.historyApiFallback) { + if (options.historyApiFallback) { var fallbackPath = typeof options.historyApiFallback === 'string' ? options.historyApiFallback : '/index.html' readFileFromContentBase(options.contentBase, fallbackPath, function (error, content, filePath) { if (error) {