mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
#### What type of PR is this? /area ui /kind cleanup #### What this PR does / why we need it: Integrated [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) into the ESLint config and added related rules. Updated all imports of core Node.js modules to use the 'node:' protocol for improved compatibility and linting. #### Does this PR introduce a user-facing change? ```release-note None ```
20 lines
524 B
TypeScript
20 lines
524 B
TypeScript
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
|
|
import path from "node:path";
|
|
import { Plugin } from "vite";
|
|
import { createViteConfig } from "./src/vite/config-builder";
|
|
|
|
export default ({ mode }: { mode: string }) => {
|
|
return createViteConfig({
|
|
base: "/uc/",
|
|
entryFile: "/uc-src/main.ts",
|
|
port: 4000,
|
|
outDir: path.resolve("build/dist/uc"),
|
|
mode,
|
|
plugins: [
|
|
VueI18nPlugin({
|
|
include: [path.resolve(__dirname, "./src/locales/*.yaml")],
|
|
}) as Plugin,
|
|
],
|
|
});
|
|
};
|