mirror of
https://github.com/halo-dev/plugin-s3.git
synced 2025-10-15 23:01:12 +00:00

```release-note 关联从其他渠道上传至 s3 的文件 ``` 【插件】->【对象存储(Amazon S3 协议)】->【关联s3文件】   目前待优化的功能: - [ ] 列出未关联的文件时会查询多次数据库,期望优化成只查询一次,但是代码改动较大。
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import { fileURLToPath, URL } from "url";
|
|
|
|
import { defineConfig } from "vite";
|
|
import Vue from "@vitejs/plugin-vue";
|
|
import VueJsx from "@vitejs/plugin-vue-jsx";
|
|
import Icons from "unplugin-icons/vite";
|
|
|
|
const pluginEntryName = "PluginS3ObjectStorage";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [Vue(), VueJsx(), Icons({ compiler: "vue3" })],
|
|
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,
|
|
},
|
|
},
|
|
},
|
|
});
|