A
A
Anton Anton2017-06-07 11:01:22
Bootstrap
Anton Anton, 2017-06-07 11:01:22

Vuejs + vue-router + vuex + bootstrap4 = 1.5MB, after UglifyJS 400KB, how to reduce?

I assembled a minimal project from Vuejs + vue-router + vuex + bootstrap4 (+ bootstrap-vue), after building bundle.js one and a half megabytes are obtained, after minification - 650 kb. The size of my sources is about 30kb. I understand that when the application is filled, it will not grow so much, but still the question is - can it be reduced?
UPD: after carefully looking at the output, I saw an error:

spoiler
ERROR in build.js from UglifyJs
Unexpected token: name (src) [build.js:14073,8]

in that place is a completely unsuspicious thing:
RDdts6h.png
в чем дело?

UPD: added es2015 preset to .babelrc, Uglify compiled everything, ~400kb result. Can you squeeze more?
UPD: separated .css with extract-text-plugin,
Asset      Size  Chunks             Chunk Names
     build.js    244 kB       0  [emitted]  main
    style.css    139 kB       0  [emitted]  main
 build.js.map   1.44 MB       0  [emitted]  main
style.css.map  86 bytes       0  [emitted]  main

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nurlan, 2017-06-07
@daager

Compressing with canvas and PNG images

K
Klein Maximus, 2018-01-31
@kleinmaximus

Abandon Bootstrap?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question