Skip to content

element-ui 并未按需加载 #490

@FoneQinrf

Description

@FoneQinrf

Describe the bug

使用该插件按需引入element-ui,打包后把element-ui全量打包了,并未按需打包。
image
image

Reproduction

https://github.com/FoneQinrf/vite-vue2

System Info

System:
    OS: macOS 12.4
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 108.18 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
Binaries:
    Node: 14.19.0 - ~/.volta/tools/image/node/14.19.0/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 6.14.16 - ~/.volta/tools/image/node/14.19.0/bin/npm
Browsers:
    Chrome: 104.0.5112.79
    Safari: 15.5

dependencies: 
    vite: 2.7
    vue: 2.7
    element-ui: 2.15.9
    unplugin-vue-components: 0.22.4

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions