前端黑马小扬 2023-02-15 15:58 采纳率: 50%
浏览 55

如何解除vue2,编译时报出的警告

img

原文报错代码:


> vue-element-admin@3.10.0 dev
> cross-env BABEL_ENV=development webpack-dev-server --host 0.0.0.0 --inline --progress --config build/webpack.dev.conf.js

 98% after emitting SizeLimitsPlugin                                                      

 WARNING  Compiled with 2 warnings                                                                                                                                                                             15:50:49

 warning

asset size limit: The following asset(s) exceed the recommended size limit (28.6 MiB).
This can impact web performance.
Assets:
  app.js (29.4 MiB)

 warning

webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
  • 写回答

3条回答 默认 最新

  • 崽崽的谷雨 2023-02-15 16:10
    关注

    您可以使用import()或require来限制捆绑包的大小。 警告 下给了 解决方案 。
    https://webpack.docschina.org/guides/code-splitting/

    评论

报告相同问题?

问题事件

  • 创建了问题 2月15日