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

Import a pre-optimized dependency will result in duplicate module request and eval #210

Closed
csr632 opened this issue May 20, 2020 · 1 comment

Comments

@csr632
Copy link
Member

csr632 commented May 20, 2020

Do NOT ignore this template or your issue will have a very high chance to be closed without comment.

Describe the bug

I have a depency moment that is depended by another dependency @alicloud/console-components. They are optimized together. But if I import moment in src, it will result in another module request, and the moment module will be eval tiwce.

We probably should normalize the module request when optimizing(rollup external config) and import-rewriting.

Reproduction

https://github.com/csr632/test-vite

System Info

  • required vite version: 0.16.2
  • required Operating System: macos
  • required Node version: v12.16.2
  • Optional:
    • npm/yarn version
    • Installed vue version (from yarn.lock or package-lock.json)
    • Installed @vue/compiler-sfc version
@yyx990803
Copy link
Member

Btw you can use the --force flag to force rebuild dependencies on server start. But I don't think you should need it after the fix.

@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

No branches or pull requests

2 participants