mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-23 23:39:47 +08:00
refactor(projects): upgrade vue3.3, official support defineOptions
This commit is contained in:
@ -15,7 +15,19 @@ import pwa from './pwa';
|
||||
* @param viteEnv - 环境变量配置
|
||||
*/
|
||||
export function setupVitePlugins(viteEnv: ImportMetaEnv): (PluginOption | PluginOption[])[] {
|
||||
const plugins = [vue(), vueJsx(), ...unplugin(viteEnv), unocss(), mock, progress(), pageRoute()];
|
||||
const plugins = [
|
||||
vue({
|
||||
script: {
|
||||
defineModel: true
|
||||
}
|
||||
}),
|
||||
vueJsx(),
|
||||
...unplugin(viteEnv),
|
||||
unocss(),
|
||||
mock,
|
||||
progress(),
|
||||
pageRoute()
|
||||
];
|
||||
|
||||
if (viteEnv.VITE_VISUALIZER === 'Y') {
|
||||
plugins.push(visualizer as PluginOption);
|
||||
|
@ -1,4 +1,3 @@
|
||||
import VueDefineOption from 'unplugin-vue-define-options/vite';
|
||||
import Icons from 'unplugin-icons/vite';
|
||||
import IconsResolver from 'unplugin-icons/resolver';
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
@ -17,7 +16,6 @@ export default function unplugin(viteEnv: ImportMetaEnv) {
|
||||
const collectionName = VITE_ICON_LOCAL_PREFFIX.replace(`${VITE_ICON_PREFFIX}-`, '');
|
||||
|
||||
return [
|
||||
VueDefineOption({}),
|
||||
Icons({
|
||||
compiler: 'vue3',
|
||||
customCollections: {
|
||||
|
Reference in New Issue
Block a user