Skip to content

tree-shaking无效 #2014

Open
Open
@zhq195

Description

@zhq195

Bug report(问题描述)

访问路由/example/list,这个页面用了 import { fetchList } from '@/api/article',作者本意是只想引入fetchList,其它的不用,在tree-shaking的作用, '@/api/article' 下的其它模块将不会引入。但是打包后确引入了

Steps to reproduce(问题复现步骤)

在 /example/list页面中,该页面只用了fetchList模块,但是fetchArticle等无用模块代码也被引入进来了。

Screenshot or Gif(截图或动态图)

image

Link to minimal reproduction(最小可在线还原demo)

Other relevant information(格外信息)

  • Your OS:
  • Node.js version:
  • vue-element-admin version:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions