phymooc / learn-webpack

0 stars 0 forks source link

Vite #6

Open phymo opened 11 months ago

phymo commented 11 months ago

Base 基础路径 配置为相对路径?

phymo commented 11 months ago

resolve.alias 把复杂的路径配置为别名 静态资源的别名配置 有坑? 必须斜杠开头 相对路径

phymo commented 11 months ago

build.minify terser build.terserOption.compress.drop_console 生产环境移除console log

phymo commented 11 months ago

使用plugin自动按需引入 element-plus 插件: unplugin auto import unplugin vue components

phymo commented 11 months ago

使用plugin自动按需引入 element-plus 插件: unplugin auto import unplugin vue components

phymo commented 11 months ago

mock数据配置 安装: vitepluginmock mockjs

配置vitemockserve() mock 数据和api

phymo commented 11 months ago

server.proxy 前端代理 解决跨域问题

phymo commented 11 months ago

配置 .env.production .env.development

使用 import.meta.env

phymo commented 11 months ago

cdn引入配置 vite plugin cdn import

phymo commented 11 months ago

代码压缩 gzip vue plugin compression

phymo commented 11 months ago

图片压缩打包 vite plugin image min