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

Regression: beta.51 breaks raw asset import #1759

Closed
3 tasks done
CarterLi opened this issue Jan 28, 2021 · 0 comments
Closed
3 tasks done

Regression: beta.51 breaks raw asset import #1759

CarterLi opened this issue Jan 28, 2021 · 0 comments

Comments

@CarterLi
Copy link

CarterLi commented Jan 28, 2021

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • 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

Following line

import svg from '@images/logo.svg?raw';

No longer works after upgrading to beta.51

> html:/Users/Carter/leopard/src/views/component/inline-svg/c-inline-svg.vue: error: Could not read from file: /Users/Carter/leopard/src/assets/images/logo.svg?raw
    2 │ import svg from '@images/logo.svg?raw';

@images is an alias of @/assets/images

Reproduction

import svg from '@images/logo.svg?raw';

System Info

  • vite version: beta.51
  • Operating System: macOS
  • Node version: v15.7.0
  • Package manager (npm/yarn/pnpm) and version: yarn version v1.22.10

Logs (Optional if provided reproduction)

N/A

@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.
Projects
None yet
Development

No branches or pull requests

1 participant