常见问题

问题1 背景颜色

@component-backgroundless全局定义变量背景一般设为此

  1. background: @component-background;

问题 2 修改 axios 响应格式

tests/server/utils.ts
image.png
src/types/axios.d.ts
image.png
src/utils/http/axios/index.ts
image.pngimage.png
src/enums/httpEnum.ts
image.png

构建&部署

构建

分析构建文件体积大小

打包分割

  1. export default () => {
  2. build: {
  3. target: 'es2015',
  4. outDir: OUTPUT_DIR,
  5. rollupOptions: {
  6. // external: 'mock/_util',
  7. output: {
  8. // 分割打包
  9. manualChunks(id) {
  10. if (id.includes('node_modules')) {
  11. return id.toString().split('node_modules/')[1].split('/')[0].toString();
  12. }
  13. },
  14. },
  15. },
  16. };
  17. };

参考

【1】https://vvbin.cn/doc-next/guide/introduction.html