Skip to content

Commit

Permalink
Remove built-in favicon.ico
Browse files Browse the repository at this point in the history
Fixes #20
  • Loading branch information
thgh committed Jan 11, 2019
1 parent 7e966cb commit 0f2bcd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Binary file removed dist/favicon.ico
Binary file not shown.
15 changes: 2 additions & 13 deletions src/index.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 0f2bcd1

Please sign in to comment.