vue.js - 如何解决服务器中的 ERROR [BABEL] 最大大小 500KB 问题?
问题描述
我正在将 NUXTJS 应用程序用于 SSR 页面,但出现 bootstrap-vue 图标大小问题的错误。
该文件托管在 AWS 服务器中,这将是错误
The code generator has deoptimised the styling of
/var/www/html/my_folder/node_modules/bootstrap-vue/src/icons/icons.js
as it exceeds the max of 500KB.
这会是什么问题?我也在构建位置添加了巴贝尔..
解决方案
尝试添加
babel: { compact: true }
下面extend(config, ctx) {},
这样
....
/*
** You can extend webpack config here
*/
extend(config, ctx) {},
babel: { compact: true }
参考:https ://github.com/bootstrap-vue/bootstrap-vue/issues/5627#issuecomment-668487772
编辑:在 nuxt.config.js 文件上编辑它
推荐阅读
- bash - 如何将输出通过管道传输到标准输出和变量?
- excel - Excel条件格式化单元格和右侧的一个单元格
- javascript - 登录后重定向url(react js)
- javascript - 在条件下预先检查单选按钮
- python - 如何将pygame场景保存为jpeg?
- laravel-livewire - 第二个表中的分页
- java - 如何在 maven 项目中使用 liquibase-modify-column.jar?
- kubernetes - 为什么 GKE HPA 没有缩减?
- python - 使用没有 ssh-keygen -p 的 python 库解密 Ed25519 私钥
- python - 如何删除索引在数据框中的另一个索引值之后的行?