problem description
deploy vue isomorphic projects in a production environment, using express at the back end. After the deployment, it was found that the vendor.js size of the vue was very large, and the open code found that "there was no compression confusion at all".
the environmental background of the problems and what methods you have tried
the current solution is to enable GZIP in the nginx layer, which is indeed a lot smaller. But this solution is obviously a bit of a waste of server resources, is there any way to compress and confuse like uglifyJs in react.
related codes
/ / Please paste the code text below (do not replace the code with pictures)
deployment mode, start with the backend, and run directly with the pm2 managed npm.
run instruction: "cross-env NODE_ENV=production nodemon server/index.j"
server/index.js uses the official nuxt code
what result do you expect? What is the error message actually seen?
maybe there"s something wrong with the way I deploy, and I"m looking forward to a better way.