-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
引入外部文件报错Uncaught SyntaxError: The requested module '/@modules/vue.js' does not provide an export named 'default' #891
Comments
Can you give a reproduction ? |
Copy what? |
Please provide a link to a repo that can reproduce the problem you ran into. A reproduction is required unless you are absolutely sure that the the problem is obvious and the information you provided is enough for us to understand what the problem is. If a report has only vague description (e.g. just a generic error message) and has no reproduction, it will be closed immediately. |
@skillnull 这个应该是因为 |
你好 我想问下解决方法是配置 optimizeDeps:{include:[]}吗?vue-class-component一直不支持不知道为什么 |
import { createRouter, createWebHashHistory } from "vue-router";
import {
BASE_ROUTE,
} from "@/router/routes.ts";
const router = createRouter({
end: false,
history: createWebHashHistory(),
sensitive: false,
strict: false,
routes: BASE_ROUTE
});
export default router; use like this |
This issue has been locked since it has been closed for more than 14 days. If you have found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Vite version. If you have any other comments you should join the chat at Vite Land or create a new discussion. |
我在router/index.ts 文件下引入 外包文件 global.ts; 运行报错
**Uncaught SyntaxError: The requested module '/@modules/vue.js' does not provide an export named 'default**
;我在vue2.x 项目中一直是这样用的没问题,但在vue3 + vite 下 就报错了;
router/index.ts
global.ts
The text was updated successfully, but these errors were encountered: