Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

引入静态资源import '@/.../index.html'报错Cannot find module,npm run dev就没问题 #18393

Closed
7 tasks done
jevonsflash opened this issue Oct 18, 2024 · 0 comments
Closed
7 tasks done

Comments

@jevonsflash
Copy link

Describe the bug

'npm create vue'创建了一个vite/vue/ts项目。
代码如下:

<script setup lang="ts"> import Material from '@/components/Material Design Icon Library/index.html' ... </script> <iframe :src="Material" frameborder="0"></iframe> ...

用'npm run dev'就能跑起来:
image

用yarn run build报错如下:
image

不知道是不是bug,btw,import vue 是没问题的

Reproduction

https://github.com/jevonsflash/matoapp-icon-collection

Steps to reproduce

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700
    Memory: 12.16 GB / 31.69 GB
  Binaries:
    Node: 20.18.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (129.0.2792.79)
    Internet Explorer: 11.0.22621.3527

Used Package Manager

npm

Logs

No response

Validations

@vitejs vitejs locked and limited conversation to collaborators Oct 19, 2024
@sapphi-red sapphi-red converted this issue into discussion #18399 Oct 19, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant