Skip to content

fix(icon): template-vanilla add favicon.ico#1340

Closed
linbingquan wants to merge 1 commit intovitejs:mainfrom
linbingquan:dev-icon
Closed

fix(icon): template-vanilla add favicon.ico#1340
linbingquan wants to merge 1 commit intovitejs:mainfrom
linbingquan:dev-icon

Conversation

@linbingquan
Copy link
Copy Markdown

Bug report:

  1. Use template: vanilla js.
  2. Run yarn and yarn build.
  3. Something warn in terminal like this.
PS D:\MyProjects\vite-helloworld> yarn build
yarn run v1.22.10
warning package.json: No license field
$ vite build
building for production...
[vite:build-html] ENOENT: no such file or directory, open 'D:\MyProjects\vite-helloworld\favicon.ico'
file: /MyProjects/vite-helloworld/index.html
error during build:
Error: ENOENT: no such file or directory, open 'D:\MyProjects\vite-helloworld\favicon.ico'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@yyx990803 yyx990803 closed this in d9df7eb Jan 4, 2021
@yyx990803
Copy link
Copy Markdown
Member

Thanks, I think it's better to just remove it.

@linbingquan
Copy link
Copy Markdown
Author

linbingquan commented Jan 4, 2021

Thank you for your reply. Is this what you want. Should I make a PR to fix it.

diff --git a/packages/create-app/template-vanilla/index.html b/packages/create-app/template-vanilla/index.html
index e4f0209..60fd73f 100644
--- a/packages/create-app/template-vanilla/index.html
+++ b/packages/create-app/template-vanilla/index.html
@@ -2,7 +2,6 @@
 <html lang="en">
 <head>
   <meta charset="UTF-8">
-  <link rel="icon" href="/favicon.ico" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Vite App</title>
 </head>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants