mirror of
https://github.com/halo-dev/plugin-starter.git
synced 2025-10-15 23:53:23 +00:00
feat: add admin frontend template
Signed-off-by: Ryan Wang <i@ryanc.cc>
This commit is contained in:
34
admin-frontend/vite.config.ts
Normal file
34
admin-frontend/vite.config.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import {fileURLToPath, URL} from "url";
|
||||
|
||||
import {defineConfig} from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue(), vueJsx()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: fileURLToPath(new URL("../src/main/resources/admin", import.meta.url)),
|
||||
emptyOutDir: true,
|
||||
lib: {
|
||||
entry: "src/index.ts",
|
||||
name: "PluginTemplate",
|
||||
formats: ["iife"],
|
||||
fileName: () => "halo-plugin-template.js",
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ["vue", "@halo-dev/shared", "@halo-dev/components"],
|
||||
output: {
|
||||
globals: {
|
||||
vue: "Vue",
|
||||
"@halo-dev/components": "components",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user