mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 09:34:19 +08:00
fix: element theme adjustment
This commit is contained in:
@@ -4,6 +4,7 @@ import type { NitroMockPluginOptions } from '../typing';
|
||||
|
||||
import { colors, consola, getPackage } from '@vben/node-utils';
|
||||
|
||||
import getPort from 'get-port';
|
||||
import { build, createDevServer, createNitro, prepare } from 'nitropack';
|
||||
|
||||
const hmrKeyRe = /^runtimeConfig\.|routeRules\./;
|
||||
@@ -15,6 +16,11 @@ export const viteNitroMockPlugin = ({
|
||||
}: NitroMockPluginOptions = {}): PluginOption => {
|
||||
return {
|
||||
async configureServer(server) {
|
||||
const availablePort = await getPort({ port });
|
||||
if (availablePort !== port) {
|
||||
return;
|
||||
}
|
||||
|
||||
const pkg = await getPackage(mockServerPackage);
|
||||
if (!pkg) {
|
||||
consola.error(`Package ${mockServerPackage} not found.`);
|
||||
|
Reference in New Issue
Block a user