xxhzm | 小小孩子们

Solve the problem that the dist folder is too large after Vue is packaged

1. Do not generate a sorce map file Set productionSourceMap to false in vue.config.js When this option is turned off, the packaged file will be twice as small 2. If the component library is referenced, set the on-demand reference If your project references the component library, the development environment can be imported without thinking, and …

Solve the problem that the dist folder is too large after Vue is packaged Read More »

Encapsulate ajax request

foreword As the title, I encapsulated an own ajax request function. Uncompressed version: https://cdn.xxhzm.cn/request/request.js Compressed version: https://cdn.xxhzm.cn/request/request.min.js Instructions for use pass parameters URL address Request method (GET, POST) request parameter request header Whether to request asynchronously (true, false), asynchronous request is enabled by default GET GET takes no parameters and no request headers: <script src=”https://cdn.xxhzm.cn/request/request.min.js”></script> …

Encapsulate ajax request Read More »