diff --git a/console/package.json b/console/package.json
index a747dfd..308833e 100644
--- a/console/package.json
+++ b/console/package.json
@@ -1,6 +1,7 @@
{
+ "type": "module",
"scripts": {
- "dev": "vite build --watch",
+ "dev": "vite build --watch --mode=development",
"build": "vite build",
"preview": "vite preview --port 4173",
"test:unit": "vitest --environment jsdom",
diff --git a/console/src/views/UmamiView.vue b/console/src/views/UmamiView.vue
index ebf2c70..e03adb0 100644
--- a/console/src/views/UmamiView.vue
+++ b/console/src/views/UmamiView.vue
@@ -1,39 +1,42 @@
+
diff --git a/console/vite.config.ts b/console/vite.config.ts
index d1a1df2..741702f 100644
--- a/console/vite.config.ts
+++ b/console/vite.config.ts
@@ -1,56 +1,18 @@
import { fileURLToPath, URL } from "url";
-import { defineConfig } from "vite";
+import { HaloUIPluginBundlerKit } from "@halo-dev/ui-plugin-bundler-kit";
import Vue from "@vitejs/plugin-vue";
import Icons from "unplugin-icons/vite";
+import { defineConfig } from "vite";
-export default ({ mode }: { mode: string }) => {
- const isProduction = mode === "production";
- const outDir = isProduction
- ? "../src/main/resources/console"
- : "../build/resources/main/console";
-
- return defineConfig({
- plugins: [Vue(), Icons({ compiler: "vue3" })],
- resolve: {
- alias: {
- "@": fileURLToPath(new URL("./src", import.meta.url)),
- },
- },
- define: {
- "process.env": process.env,
- },
- build: {
- outDir,
- emptyOutDir: true,
- lib: {
- entry: "src/index.ts",
- name: "PluginUmami",
- formats: ["iife"],
- fileName: () => "main.js",
- },
- rollupOptions: {
- external: [
- "vue",
- "vue-router",
- "@vueuse/core",
- "@vueuse/components",
- "@vueuse/router",
- "@halo-dev/shared",
- "@halo-dev/components",
- ],
- output: {
- globals: {
- vue: "Vue",
- "vue-router": "VueRouter",
- "@vueuse/core": "VueUse",
- "@vueuse/components": "VueUse",
- "@vueuse/router": "VueUse",
- "@halo-dev/console-shared": "HaloConsoleShared",
- "@halo-dev/components": "HaloComponents",
- },
- },
- },
+export default defineConfig({
+ plugins: [Vue(), Icons({ compiler: "vue3" }), HaloUIPluginBundlerKit()],
+ resolve: {
+ alias: {
+ "@": fileURLToPath(new URL("./src", import.meta.url)),
},
- });
-};
+ },
+ define: {
+ "process.env": process.env,
+ },
+});
diff --git a/src/main/resources/plugin.yaml b/src/main/resources/plugin.yaml
index e76c498..923dd36 100644
--- a/src/main/resources/plugin.yaml
+++ b/src/main/resources/plugin.yaml
@@ -7,7 +7,7 @@ metadata:
spec:
enabled: true
version: 1.0.0
- requires: ">=2.0.0"
+ requires: ">=2.17.0"
author:
name: Halo
website: https://github.com/halo-dev