diff --git a/build.gradle b/build.gradle index b9c13f3..8255b89 100644 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ configurations.runtimeClasspath { halo { - version = '2.10.1' + version = '2.12.1' } haloPlugin { diff --git a/console/package.json b/console/package.json index bfb56f4..d41d51b 100644 --- a/console/package.json +++ b/console/package.json @@ -21,6 +21,7 @@ "vue": "^3.3.4" }, "devDependencies": { + "@halo-dev/ui-plugin-bundler-kit": "^2.12.0", "@iconify/json": "^2.2.18", "@rushstack/eslint-patch": "^1.2.0", "@types/canvas-confetti": "^1.6.0", diff --git a/console/pnpm-lock.yaml b/console/pnpm-lock.yaml index 0430ca0..4b4e6c5 100644 --- a/console/pnpm-lock.yaml +++ b/console/pnpm-lock.yaml @@ -31,6 +31,9 @@ dependencies: version: 3.3.7(typescript@4.7.4) devDependencies: + '@halo-dev/ui-plugin-bundler-kit': + specifier: ^2.12.0 + version: 2.12.0(vite@3.1.8) '@iconify/json': specifier: ^2.2.18 version: 2.2.18 @@ -582,6 +585,15 @@ packages: vue-router: 4.2.5(vue@3.3.7) dev: false + /@halo-dev/ui-plugin-bundler-kit@2.12.0(vite@3.1.8): + resolution: {integrity: sha512-3558qzH5RN9pB2j0ZonuIxX3cw8lh870cWpPPHjkDxTIjKt+aO5tjKhcqKlFL853jdx9nHIIS+nMDCeqjejpxw==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + vite: ^4.0.0 || ^5.0.0 + dependencies: + vite: 3.1.8(sass@1.58.0) + dev: true + /@humanwhocodes/config-array@0.11.6: resolution: {integrity: sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==} engines: {node: '>=10.10.0'} diff --git a/console/vite.config.ts b/console/vite.config.ts index 580962e..dd2433d 100644 --- a/console/vite.config.ts +++ b/console/vite.config.ts @@ -4,44 +4,18 @@ import { defineConfig } from "vite"; import Vue from "@vitejs/plugin-vue"; import VueJsx from "@vitejs/plugin-vue-jsx"; import Icons from "unplugin-icons/vite"; +import { HaloUIPluginBundlerKit } from "@halo-dev/ui-plugin-bundler-kit"; -const pluginEntryName = "PluginS3ObjectStorage"; - -// https://vitejs.dev/config/ export default defineConfig({ - plugins: [Vue(), VueJsx(), Icons({ compiler: "vue3" })], + plugins: [ + Vue(), + VueJsx(), + Icons({ compiler: "vue3" }), + HaloUIPluginBundlerKit(), + ], resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)), }, }, - build: { - outDir: fileURLToPath( - new URL("../src/main/resources/console", import.meta.url) - ), - emptyOutDir: true, - lib: { - entry: "src/index.ts", - name: pluginEntryName, - formats: ["iife"], - fileName: () => "main.js", - }, - rollupOptions: { - external: [ - "vue", - "@halo-dev/console-shared", - "@halo-dev/components", - "vue-router", - ], - output: { - globals: { - vue: "Vue", - "vue-router": "VueRouter", - "@halo-dev/components": "HaloComponents", - "@halo-dev/console-shared": "HaloConsoleShared", - }, - extend: true, - }, - }, - }, });