Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can solve the ERROR [BABEL] maximum size 500KB issue in server?

I am using NUXTJS application for an SSR page, but i am getting an error of bootstrap-vue icon size issue.

The file is hosted in AWS server and this will be the error

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.

enter image description here

What will be the issue on this ? i have added babbel in build location too..

like image 260
Syam kumar KK Avatar asked Jul 31 '20 10:07

Syam kumar KK


2 Answers

Try to add

babel: { compact: true }

below extend(config, ctx) {}, like this

....
 /*
 ** You can extend webpack config here
 */
 extend(config, ctx) {},
 babel: { compact: true }

ref: https://github.com/bootstrap-vue/bootstrap-vue/issues/5627#issuecomment-668487772

Edit: edit this on nuxt.config.js file

like image 176
Fahmi Avatar answered Sep 16 '22 12:09

Fahmi


you can add it like this and it works,just added in your nuxt.config.js file

  build: {
     babel: {
      compact: true,
     },
  },
like image 21
Mustafa El-Gaml Avatar answered Sep 20 '22 12:09

Mustafa El-Gaml