Files
halo/ui/vite.config.ts
Ryan Wang 1cb0629364 Add eslint-plugin-unicorn and use node: protocol imports (#7845)
#### 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
```
2025-10-22 08:36:14 +00:00

20 lines
539 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: "/console/",
entryFile: "/console-src/main.ts",
port: 3000,
outDir: path.resolve("build/dist/console"),
mode,
plugins: [
VueI18nPlugin({
include: [path.resolve(__dirname, "./src/locales/*.yaml")],
}) as Plugin,
],
});
};