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

在vite项目中引入出现异常 #23

Open
cold-cyan opened this issue Jul 2, 2024 · 3 comments
Open

在vite项目中引入出现异常 #23

cold-cyan opened this issue Jul 2, 2024 · 3 comments

Comments

@cold-cyan
Copy link

根据文档引入
import VueRulerTool from 'vue-ruler-tool'
Vue.component('vue-ruler-tool', VueRulerTool)
vite出现异常
`Could not resolve "./components/vue-ruler-tool"

node_modules/vue-ruler-tool/src/index.js:4:24:
  4 │ export { default } from './components/vue-ruler-tool'
    ╵                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

`

@cold-cyan
Copy link
Author

解决方法 在index.js中为导出语句加上 .vue后缀即可 image

@LuckyXJ
Copy link

LuckyXJ commented Dec 30, 2024

解决方法 在index.js中为导出语句加上 .vue后缀即可 image

这个问题还没修复,但是在依赖里改代码终归不是办法啊。别人重新依赖是没变的

@cold-cyan
Copy link
Author

解决方法 在index.js中为导出语句加上 .vue后缀即可 image

这个问题还没修复,但是在依赖里改代码终归不是办法啊。别人重新依赖是没变的

解决方法 在index.js中为导出语句加上 .vue后缀即可 image

这个问题还没修复,但是在依赖里改代码终归不是办法啊。别人重新依赖是没变的

如果没有其他解决方法 并且又是刚需的话 只能先这么用了

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

No branches or pull requests

2 participants