Newer
Older
urbanLifeline_YanAn / vite / plugins / index.js
@zhangqy zhangqy on 3 Oct 608 bytes first commit
  1. import vue from '@vitejs/plugin-vue';
  2.  
  3. import createAutoImport from './auto-import';
  4. import createSvgIcon from './svg-icon';
  5. import createCompression from './compression';
  6. import createSetupExtend from './setup-extend';
  7. // import pluginZip from './buildZip';
  8.  
  9. export default function createVitePlugins(viteEnv, isBuild = false) {
  10. const vitePlugins = [vue()];
  11. vitePlugins.push(createAutoImport());
  12. vitePlugins.push(createSetupExtend());
  13. vitePlugins.push(createSvgIcon(isBuild));
  14. // vitePlugins.push(pluginZip());
  15. isBuild && vitePlugins.push(...createCompression(viteEnv));
  16. return vitePlugins;
  17. }