
* chore(@vben/common-ui): 增加拖拽校验组件 * chore: 增加样式 * Merge branch 'main' into wangjue-verify-comp * chore: 封装action组件 * chore: 拆分完成拖拽功能 * chore: 样式调整为tailwindcss语法 * chore: 导出check图标 * chore: 拖动的图标变为@vben/icons的 * chore: 完成插槽功能迁移 * fix: ci error * chore: 适配暗黑主题 * chore: 国际化 * chore: resolve conflict * chore: 迁移v2的图片旋转校验组件 * chore: 完善选择校验demo * chore: 转换为tailwindcss * chore: 替换为系统的颜色变量 * chore: 使用interface代替组件的props声明 * chore: 调整props * chore: 优化demo背景 * chore: follow suggest * chore: rm unnecessary style tag * chore: update demo * perf: improve the experience of Captcha components --------- Co-authored-by: vince <vince292007@gmail.com> Co-authored-by: Vben <ann.vben@gmail.com>
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
import type { Options as PwaPluginOptions } from 'vite-plugin-pwa';
|
||
|
||
import type { ImportmapPluginOptions } from './typing';
|
||
|
||
const isDevelopment = process.env.NODE_ENV === 'development';
|
||
|
||
const getDefaultPwaOptions = (name: string): Partial<PwaPluginOptions> => ({
|
||
manifest: {
|
||
description:
|
||
'Vben Admin is a modern admin dashboard template based on Vue 3. ',
|
||
icons: [
|
||
{
|
||
sizes: '192x192',
|
||
src: 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/pwa-icon-192.png',
|
||
type: 'image/png',
|
||
},
|
||
{
|
||
sizes: '512x512',
|
||
src: 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/pwa-icon-512.png',
|
||
type: 'image/png',
|
||
},
|
||
],
|
||
name: `${name}${isDevelopment ? ' dev' : ''}`,
|
||
short_name: `${name}${isDevelopment ? ' dev' : ''}`,
|
||
},
|
||
});
|
||
|
||
/**
|
||
* importmap CDN 暂时不开启,因为有些包不支持,且网络不稳定
|
||
*/
|
||
const defaultImportmapOptions: ImportmapPluginOptions = {
|
||
// 通过 Importmap CDN 方式引入,
|
||
// 目前只有esm.sh源兼容性好一点,jspm.io对于 esm 入口要求高
|
||
defaultProvider: 'esm.sh',
|
||
importmap: [
|
||
{ name: 'vue' },
|
||
{ name: 'pinia' },
|
||
{ name: 'vue-router' },
|
||
// { name: 'vue-i18n' },
|
||
{ name: 'dayjs' },
|
||
{ name: 'vue-demi' },
|
||
],
|
||
};
|
||
|
||
export { defaultImportmapOptions, getDefaultPwaOptions };
|