Skip to content

启动就会包错 #3492

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

Closed
1 task
dmyz opened this issue Jan 6, 2021 · 2 comments
Closed
1 task

启动就会包错 #3492

dmyz opened this issue Jan 6, 2021 · 2 comments
Labels

Comments

@dmyz
Copy link

dmyz commented Jan 6, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-rc.7

Environment

{
  "name": "vite-vue-app",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vite build"
  },
  "dependencies": {
    "ant-design-vue": "^2.0.0-rc.7",
    "vue": "^3.0.5"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^1.0.4",
    "@vue/compiler-sfc": "^3.0.5",
    "vite": "^2.0.0-beta.9"
  }
}

Reproduction link

Steps to reproduce

启动就会包错

What is expected?

正常使用

What is actually happening?

ant-design-vue
Pre-bundling them to speed up dev server page load...
(this will be run only when your dependencies have changed)
'indexof' is imported by indexof?commonjs-external, but could not be resolved – treating it as an external dependency
'resolveDirective' is imported from external module 'vue' but never used
[plugin:vite:imports] Failed to resolve import "indexof". Does the file exist?
/Desktop/demo/manage-web/node_modules/.vite/ant-design-vue.c99e5497.js:3:25
1  |  import _vue, { Comment as Comment$2, Fragment, Text, isVNode, nextTick, defineComponent, inject, createVNode, reactive, provide, watch, cloneVNode, computed, ref, watchEffect, onBeforeUnmount, withDirectives, Transition as Transition$1, TransitionGroup as TransitionGroup$1, onMounted, createTextVNode, onBeforeUpdate, vShow, Teleport, getCurrentInstance, toRaw, toRef, toRefs, createApp, markRaw, onUnmounted } from 'vue';
2  |  import { i as index_esm } from './common/index.esm.7c62bc5d.js';
3  |  import require$$0 from 'indexof';
|                          ^
4  |  import { CloseOutlined as CloseOutlined$3, ZoomInOutlined, ZoomOutOutlined, RotateRightOutlined, RotateLeftOutlined, LeftOutlined as LeftOutlined$3, RightOutlined as RightOutlined$3 } from '@ant-design/icons-vue';
5  |
Error: Failed to resolve import "indexof". Does the file exist?
at TransformContext.error (D:\Desktop\demo\manage-web\node_modules\vite\dist\node\chunks\dep-7bace6f3.js:59717:50)
at TransformContext.transform (D:\Desktop\demo\manage-web\node_modules\vite\dist\node\chunks\dep-7bace6f3.js:53118:30)
at async Object.transform (D:\Desktop\demo\manage-web\node_modules\vite\dist\node\chunks\dep-7bace6f3.js:59907:30)
at async transformRequest (D:\Desktop\demo\manage-web\node_modules\vite\dist\node\chunks\dep-7bace6f3.js:66142:29)
at async D:\Desktop\demo\manage-web\node_modules\vite\dist\node\chunks\dep-7bace6f3.js:66229:32
Click outside or fix the code to dismiss.
You can also disable this overlay with hmr: { overlay: false } in vite.config.js.
@zkwolf
Copy link
Member

zkwolf commented Jan 6, 2021

Dupllicate #3481

@zkwolf zkwolf closed this as completed Jan 6, 2021
@github-actions
Copy link

github-actions bot commented Jan 7, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants