Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-JS assets are not quoted #1668

Closed
2 of 3 tasks
DreierF opened this issue Jan 23, 2021 · 0 comments
Closed
2 of 3 tasks

Non-JS assets are not quoted #1668

DreierF opened this issue Jan 23, 2021 · 0 comments

Comments

@DreierF
Copy link
Contributor

DreierF commented Jan 23, 2021

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

When adding a non JS asset to the index.html the quotes around the path are stripped in the production build.

Reproduction

Add the following to the index.html and the corresponding file into public/

<head>
    <!-- ... -->
    <link rel="icon" href="/favicon.ico" type="image/x-icon" />
    <!-- ... -->
</head>

The result in production looks like this:

  <link rel="icon" href=/favicon.ico type="image/x-icon" />

According to the spec this would even be allowed, but it breaks as soon as you have a space in the path, which also ends up unquoted in the production bundle.

IMO it should always be quoted.

System Info

  • vite version: 2.0.0-beta.44
  • Operating System: MacOS
  • Node version: 14.15.4
  • Package manager (npm/yarn/pnpm) and version: yarn
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants