mirror of
https://github.com/halo-dev/plugin-s3.git
synced 2025-10-16 23:39:51 +00:00
chore: simplify bundler config (#117)
使用 `@halo-dev/ui-plugin-bundler-kit` 简化构建配置。 /kind improvement ```release-note None ```
This commit is contained in:
@@ -36,7 +36,7 @@ configurations.runtimeClasspath {
|
|||||||
|
|
||||||
|
|
||||||
halo {
|
halo {
|
||||||
version = '2.10.1'
|
version = '2.12.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
haloPlugin {
|
haloPlugin {
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
"vue": "^3.3.4"
|
"vue": "^3.3.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@halo-dev/ui-plugin-bundler-kit": "^2.12.0",
|
||||||
"@iconify/json": "^2.2.18",
|
"@iconify/json": "^2.2.18",
|
||||||
"@rushstack/eslint-patch": "^1.2.0",
|
"@rushstack/eslint-patch": "^1.2.0",
|
||||||
"@types/canvas-confetti": "^1.6.0",
|
"@types/canvas-confetti": "^1.6.0",
|
||||||
|
12
console/pnpm-lock.yaml
generated
12
console/pnpm-lock.yaml
generated
@@ -31,6 +31,9 @@ dependencies:
|
|||||||
version: 3.3.7(typescript@4.7.4)
|
version: 3.3.7(typescript@4.7.4)
|
||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
|
'@halo-dev/ui-plugin-bundler-kit':
|
||||||
|
specifier: ^2.12.0
|
||||||
|
version: 2.12.0(vite@3.1.8)
|
||||||
'@iconify/json':
|
'@iconify/json':
|
||||||
specifier: ^2.2.18
|
specifier: ^2.2.18
|
||||||
version: 2.2.18
|
version: 2.2.18
|
||||||
@@ -582,6 +585,15 @@ packages:
|
|||||||
vue-router: 4.2.5(vue@3.3.7)
|
vue-router: 4.2.5(vue@3.3.7)
|
||||||
dev: false
|
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:
|
/@humanwhocodes/config-array@0.11.6:
|
||||||
resolution: {integrity: sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==}
|
resolution: {integrity: sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==}
|
||||||
engines: {node: '>=10.10.0'}
|
engines: {node: '>=10.10.0'}
|
||||||
|
@@ -4,44 +4,18 @@ import { defineConfig } from "vite";
|
|||||||
import Vue from "@vitejs/plugin-vue";
|
import Vue from "@vitejs/plugin-vue";
|
||||||
import VueJsx from "@vitejs/plugin-vue-jsx";
|
import VueJsx from "@vitejs/plugin-vue-jsx";
|
||||||
import Icons from "unplugin-icons/vite";
|
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({
|
export default defineConfig({
|
||||||
plugins: [Vue(), VueJsx(), Icons({ compiler: "vue3" })],
|
plugins: [
|
||||||
|
Vue(),
|
||||||
|
VueJsx(),
|
||||||
|
Icons({ compiler: "vue3" }),
|
||||||
|
HaloUIPluginBundlerKit(),
|
||||||
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
"@": 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,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user