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

Unable to resolve typeface-module #392

Closed
delaneyj opened this issue Jun 14, 2020 · 0 comments · Fixed by #393
Closed

Unable to resolve typeface-module #392

delaneyj opened this issue Jun 14, 2020 · 0 comments · Fixed by #393

Comments

@delaneyj
Copy link

Describe the bug

Moving a webpack/vue2 app to vite/vue3. App uses typeface-inter via import 'typeface-inter' in the App.vue. When trying to do the same using vite get

[vite] Failed to resolve module import "typeface-inter/Inter%20(web)/Inter-Regular.woff2". (imported by /)
[vite] Failed to resolve module import "typeface-inter/Inter%20(web)/Inter-Bold.woff2". (imported by /)
[vite] Failed to resolve module import "typeface-inter/Inter%20(web)/Inter-Regular.woff". (imported by /)
[vite] Failed to resolve module import "typeface-inter/Inter%20(web)/Inter-Bold.woff". (imported by /)

Can confirm the files are there. Also can confirm using

<style lang="postcss">
    @import url('https://rsms.me/inter/inter.css');
</style>

works but obviously won't bundle with the app. Is it possibly the %20/space in the path?

Reproduction

yarn add typeface-inter

//...in App.vue
import 'typeface-inter'

System Info

  • required vite version:0.20.0
  • required Operating System:PopOS 18.04
  • required Node version:12.16.1
  • Optional:
    • npm/yarn version: Yarn 1.22.4
    • Installed vue : 3.0.0-beta.15
    • Installed @vue/compiler-sfc version: 3.0.0-beta.15
underfin added a commit to rolldown/vite that referenced this issue Jun 15, 2020
yyx990803 pushed a commit that referenced this issue Jun 18, 2020
@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

Successfully merging a pull request may close this issue.

1 participant