Skip to content

Commit

Permalink
feat: add favicon to the app to avoid 404 (#19416)
Browse files Browse the repository at this point in the history
* feat: add a favicon to the app

* make it work on M1

* chore: add comment in plugin configuration

* update sharp
  • Loading branch information
Barthélémy Ledoux authored Dec 22, 2021
1 parent b441950 commit edccfc9
Show file tree
Hide file tree
Showing 5 changed files with 596 additions and 34 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,10 @@
"**/@types/react": "16.9.50",
"**/jquery": "3.1.1",
"**/pretty-format": "26.4.0",
"**/sharp": "0.29.3",
"**/socket.io-parser": "4.0.4",
"**/ua-parser-js": "0.7.24",
"sharp": "0.29.3",
"vue-template-compiler": "2.6.12"
}
}
1 change: 1 addition & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"unplugin-vue-components": "^0.15.2",
"vite": "2.4.4",
"vite-plugin-components": "0.11.3",
"vite-plugin-favicon": "1.0.8",
"vite-plugin-icons": "0.6.3",
"vite-plugin-pages": "0.18.1",
"vite-plugin-purge-icons": "0.7.0",
Expand Down
16 changes: 16 additions & 0 deletions packages/app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { makeConfig } from '../frontend-shared/vite.config'
import { ViteFaviconsPlugin } from 'vite-plugin-favicon'
import Layouts from 'vite-plugin-vue-layouts'
import Pages from 'vite-plugin-pages'

Expand All @@ -18,5 +19,20 @@ export default makeConfig({
plugins: [
Layouts(),
Pages({ extensions: ['vue'] }),
ViteFaviconsPlugin({
logo: require.resolve('@packages/frontend-shared/src/assets/logos/favicon.png'),
// avoid building favicons for all formats at startup by explicitly saying no to most
// It takes a good 20 sec to make if we dont and we don't use it anyway
favicons: {
icons: {
android: false, // Create Android homescreen icon. `boolean` or `{ offset, background }` or an array of sources
appleIcon: false, // Create Apple touch icons. `boolean` or `{ offset, background }` or an array of sources
appleStartup: false, // Create Apple startup images. `boolean` or `{ offset, background }` or an array of sources
favicons: true, // Create regular favicons. `boolean` or `{ offset, background }` or an array of sources
windows: false, // Create Windows 8 tile icons. `boolean` or `{ offset, background }` or an array of sources
yandex: false, // Create Yandex browser icon. `boolean` or `{ offset, background }` or an array of sources
},
},
}),
],
})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

1 comment on commit edccfc9

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on edccfc9 Dec 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.0.0/circle-10.0-release-edccfc933d65c226915963081db9c1accfa3fd40/cypress.tgz

Please sign in to comment.