Compare commits

...
5 Commits
16 changed files with 1758 additions and 4042 deletions

No files matched your search

-4
View File
@@ -1,4 +0,0 @@
node_modules/
tsconfig.json
public/config.js
vite.config.ts
-104
View File
@@ -1,104 +0,0 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript"
],
"ignorePatterns": [
"node_modules",
"build",
"generateVersionFile.cjs",
"config.template.js"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"react",
"import",
"@typescript-eslint",
"react-hooks",
"prettier"
],
"rules": {
"import/default": "off",
"import/no-named-as-default": "off",
"prettier/prettier": "off",
"quotes": [
"error",
"single"
],
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js",
".jsx",
".tsx"
]
}
],
"react/jsx-one-expression-per-line": "off",
"react/prop-types": 0,
"react/react-in-jsx-scope": "off",
"semi": [
"error",
"never"
],
"@typescript-eslint/no-unused-vars": [
"off"
],
"@typescript-eslint/no-explicit-any": [
"off",
null
],
"@typescript-eslint/no-non-null-assertion": [
"off"
],
"import/no-unresolved": "error",
"no-unused-vars": "off"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [
".ts",
".tsx"
]
},
"react": {
"version": "detect"
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
},
"node": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
],
"moduleDirectory": [
"node_modules",
"src/"
]
}
}
}
}
+1
View File
@@ -0,0 +1 @@
24
+2
View File
@@ -5,6 +5,8 @@ WORKDIR /usr/src/app
FROM base as deps
COPY vendor/ ./vendor/
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
+8 -13
View File
@@ -29,19 +29,14 @@ export default {
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
1
## Локальная альфа-сборка
### Проверка совместимости зависимостей
Используйте Node.js 24 (`nvm use`), затем `npm ci` и `npm run build`.
Приложение собирается Vite 8.4 (Rolldown/Oxc). Зависимости isp-ui-kit и isp-admin-ui-kit установлены из архивов в `vendor/`; сохраняйте их вместе с package-lock.json.
Monaco 0.58 использует публичные пути workers в src/index.tsx.
TypeScript 6, ESLint 9 и ReDoc 2 оставлены для совместимости текущих плагинов и собственного рендера документации.
После обновления зависимостей выполните `npm ci`, `npm run lint`, `npm run build`
и `npm run test:dependencies`. Последняя команда собирает отдельную проверочную
страницу. Запустите `npm run preview -- --outDir build/dependency-smoke --port 4174`
и откройте `http://localhost:4174/tests/dependency-smoke.html`.
Успешный результат — `Dependency checks passed`. Проверяются DOMPurify, Mermaid
(включая формулы), KaTeX, JSON Schema/RJSF, ReDoc, Router и JSON worker Monaco.
Страница проверки не входит в основную production-сборку.
CSS колонок и SimpleBar уже входит в isp-ui-kit: повторные импорты и прямые зависимости приложения удалены. Node-полифилы и дополнительные overrides приложению больше не нужны.
Версии исходников и контрольные суммы обоих архивов: [vendor/README.md](vendor/README.md).
В `overrides` закреплены исправленные DOMPurify и KaTeX без обновления Monaco и
Mermaid на новые основные версии. Overrides minimatch/glob относятся к инструментам
разработки. Библиотека `isp-admin-ui-kit` поддерживает Router 7.
React остаётся в ветке 18. Вместо всех Node-полифилов подключаются только Buffer/process и браузерные реализации path/http/url,
необходимые парсерам JSON Schema/OpenAPI и ReDoc. Криптографические полифилы удалены.
После обновления UI-пакетов запустите `npx playwright install chromium`, затем `npm run test:smoke`. Проверка собирает production-бандл и открывает его в Chromium на 1440 и 375 px с локальными API-ответами: вход, JSON Schema, ReDoc/Mermaid и настоящий Monaco в редакторе конфигурации, включая JSON worker и ошибки типов по схеме.
+31
View File
@@ -0,0 +1,31 @@
import js from '@eslint/js'
import importPlugin from 'eslint-plugin-import'
import react from 'eslint-plugin-react'
import globals from 'globals'
import tseslint from 'typescript-eslint'
export default [
{ ignores: ['node_modules/**', 'dist/**', 'build/**', 'storybook-static/**', 'test-results/**', 'src/**/ReactJsonView/**', 'src/stories/**'] },
js.configs.recommended,
...tseslint.configs.recommended,
react.configs.flat['jsx-runtime'],
{
files: ['src/**/*.{js,jsx,ts,tsx}'],
plugins: { import: importPlugin },
languageOptions: { globals: { ...globals.browser, ...globals.node } },
settings: {
react: { version: 'detect' },
'import/resolver': { typescript: { project: './tsconfig.json' } }
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'no-unused-vars': 'off',
'import/no-unresolved': 'error',
quotes: ['error', 'single'],
semi: ['error', 'never']
}
}
]
+1378 -3799
View File
File diff suppressed because it is too large. Load diff
+37 -64
View File
@@ -6,72 +6,48 @@
"scripts": {
"start": "vite",
"build": "NODE_OPTIONS=--max-old-space-size=4096 vite build && node generateVersionFile.cjs",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint src --max-warnings 0",
"preview": "vite preview",
"fix:prettier": "prettier --write \"src/**/*.{ts,tsx, js}\"",
"lint:fix": "eslint --fix .",
"analyze": "source-map-explorer 'build/static/js/*.js'",
"analyze": "vite-bundle-visualizer",
"prepare": "husky || true",
"test:dependencies": "vite build --config tests/dependency-smoke.config.ts"
"test:smoke": "npm run build && node tests/production-smoke.mjs"
},
"dependencies": {
"@monaco-editor/react": "^4.6.0",
"@reduxjs/toolkit": "^2.2.3",
"axios": "^1.20.0",
"buffer": "^6.0.3",
"dayjs": "^1.11.10",
"isp-admin-ui-kit": "^1.16.0",
"isp-ui-kit": "^2.3.3",
"monaco-editor": "^0.55.1",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.51.2",
"react-redux": "^9.1.0",
"react-resizable": "^3.0.5",
"react-router-dom": "^7.18.7",
"simplebar": "^6.2.5",
"simplebar-react": "^3.2.4",
"stream-http": "^3.2.0",
"url": "^0.11.4"
"@monaco-editor/react": "^4.7.0",
"@reduxjs/toolkit": "^2.16.0",
"axios": "^1.21.1",
"dayjs": "^1.11.23",
"isp-admin-ui-kit": "file:vendor/isp-admin-ui-kit-3.0.0.tgz",
"isp-ui-kit": "file:vendor/isp-ui-kit-3.0.1.tgz",
"monaco-editor": "^0.58.0",
"react": "^19.3.1",
"react-dom": "^19.3.1",
"react-hook-form": "^7.92.0",
"react-redux": "^9.3.1",
"react-router-dom": "^7.18.7"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/deep-equal": "^1.0.4",
"@types/lodash.clonedeep": "^4.5.9",
"@types/node": "^20.12.4",
"@types/react": "^18.2.74",
"@types/react-dom": "^18.2.24",
"@types/react-resizable": "^3.0.7",
"@typescript-eslint/eslint-plugin": "^8.74.0",
"@typescript-eslint/parser": "^8.74.0",
"@vitejs/plugin-react": "^4.2.1",
"antd": "6.4.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"husky": "^9.0.11",
"prettier": "^3.2.5",
"sass": "1.74.1",
"terser": "^5.30.3",
"typescript": "^5.4.3",
"vite": "^6.4.6",
"vite-bundle-visualizer": "^1.2.1",
"vite-plugin-style-import": "^2.0.0",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.2"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
"@eslint/js": "^9.39.5",
"@playwright/test": "^1.65.1",
"@trivago/prettier-plugin-sort-imports": "^6.0.3",
"@types/node": "^26.6.11",
"@types/react": "^19.3.3",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.3.0",
"antd": "^6.7.2",
"eslint": "^9.39.5",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-react": "^7.37.5",
"globals": "^17.14.0",
"husky": "^9.1.7",
"prettier": "^3.10.1",
"typescript": "^6.0.3",
"typescript-eslint": "^8.74.0",
"vite": "^8.4.0",
"vite-bundle-visualizer": "^1.2.1"
},
"husky": {
"hooks": {
@@ -79,11 +55,8 @@
"pre-push": "eslint --fix ."
}
},
"overrides": {
"dompurify": "~3.4.18",
"katex": "~0.18.2",
"minimatch@>=7 <11": "^11.0.1",
"glob@>=9 <14.0.2": "^14.0.2",
"react-router-dom": "$react-router-dom"
"engines": {
"node": ">=22.19.0",
"npm": ">=10"
}
}
-11
View File
@@ -1,11 +0,0 @@
import { Buffer } from 'buffer'
import process from 'process'
// OpenAPI/JSON Schema browser builds still use these Node globals.
// Load only the required shims, without Node's crypto modules.
if (typeof globalThis.Buffer === 'undefined') {
Object.assign(globalThis, { Buffer })
}
if (typeof globalThis.process === 'undefined') {
Object.assign(globalThis, { process })
}
+7 -12
View File
@@ -1,22 +1,17 @@
import './browser-polyfills'
import { loader } from '@monaco-editor/react'
import { setupListeners } from '@reduxjs/toolkit/query'
import { locale } from 'dayjs'
import dayjs from 'dayjs'
import 'dayjs/locale/ru'
import { AdminBase, baseSetupStore } from 'isp-admin-ui-kit'
import * as monaco from 'monaco-editor'
import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker'
import cssWorker from 'monaco-editor/esm/vs/language/css/css.worker?worker'
import htmlWorker from 'monaco-editor/esm/vs/language/html/html.worker?worker'
import jsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker'
import editorWorker from 'monaco-editor/editor/editor.worker?worker'
import cssWorker from 'monaco-editor/languages/features/css/css.worker?worker'
import htmlWorker from 'monaco-editor/languages/features/html/html.worker?worker'
import jsonWorker from 'monaco-editor/languages/features/json/json.worker?worker'
import { createRoot } from 'react-dom/client'
import { Provider } from 'react-redux'
import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker'
import 'react-resizable/css/styles.css'
import 'simplebar-react/dist/simplebar.min.css'
import tsWorker from 'monaco-editor/languages/features/typescript/ts.worker?worker'
self.MonacoEnvironment = {
getWorker(_, label) {
@@ -40,7 +35,7 @@ loader.config({ monaco })
loader.init().then()
locale('ru')
dayjs.locale('ru')
const store = baseSetupStore()
setupListeners(store.dispatch)
const root = createRoot(document.getElementById('root') as HTMLElement)
+259
View File
@@ -0,0 +1,259 @@
import { chromium } from '@playwright/test'
import { readFile, stat } from 'node:fs/promises'
import { createServer } from 'node:http'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const root = fileURLToPath(new URL('../build', import.meta.url))
const types = {
'.js': 'text/javascript',
'.css': 'text/css',
'.html': 'text/html',
'.json': 'application/json',
'.svg': 'image/svg+xml',
'.png': 'image/png',
'.woff': 'font/woff',
'.woff2': 'font/woff2'
}
const server = createServer(async (req, res) => {
try {
if (new URL(req.url, 'http://localhost').pathname === '/config.js') {
res.setHeader('Content-Type', 'text/javascript')
res.end(
'window.config = {ENABLE_PASSWORD_LOGIN: true, ENABLE_OAUTH_LOGIN: false, CLIENT_NAME: "isp-admin-ui", APP_TOKEN: "alpha-smoke"};'
)
return
}
let file = path.resolve(
root,
'.' + decodeURIComponent(new URL(req.url, 'http://localhost').pathname)
)
if (!file.startsWith(root + path.sep) && file !== root) {
res.writeHead(403)
res.end()
return
}
try {
if ((await stat(file)).isDirectory()) file = path.join(file, 'index.html')
} catch {
file = path.join(root, 'index.html')
}
res.setHeader(
'Content-Type',
types[path.extname(file)] || 'application/octet-stream'
)
res.end(await readFile(file))
} catch (e) {
res.writeHead(500)
res.end(e.message)
}
})
await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve))
const url = `http://127.0.0.1:${server.address().port}`
const browser = await chromium.launch()
const reports = []
try {
for (const width of [1440, 375]) {
const page = await browser.newPage({
viewport: { width, height: width < 768 ? 812 : 1000 }
})
const errors = []
page.on('pageerror', (e) => errors.push(e.message))
await page.route('**/api/**', (route) =>
route.fulfill({
status: 200,
contentType: 'application/json',
body: '{}'
})
)
await page.goto(url, { waitUntil: 'networkidle' })
await page
.getByRole('heading', { name: 'Вход', exact: true })
.waitFor({ timeout: 20000 })
if (errors.length) throw new Error(JSON.stringify(errors))
reports.push({
width,
url: page.url(),
heading: 'Вход',
uncaughtErrors: errors.length
})
await page.close()
}
for (const width of [1440, 375]) {
const page = await browser.newPage({
viewport: { width, height: width < 768 ? 812 : 1000 }
})
const errors = []
page.on('pageerror', (e) => errors.push(e.message))
await page.addInitScript(() =>
localStorage.setItem('USER_TOKEN', 'local-smoke-token')
)
const schema = {
title: 'Проверочная схема',
type: 'object',
properties: { payload: { $ref: '#/definitions/Message' } },
definitions: {
Message: {
type: 'object',
properties: {
smokeField: { type: 'string', description: 'Reference resolved' }
}
}
}
}
const module = {
id: '1',
name: 'smoke-service',
active: true,
configs: [],
createdAt: '2026-01-01T00:00:00Z',
lastConnectedAt: '2026-01-01T00:00:00Z',
requiredModules: [],
configSchema: schema,
status: [
{
id: '1',
version: '1.0.0',
libVersion: '1.0.0',
establishedAt: '2026-01-01T00:00:00Z',
address: { ip: '127.0.0.1', port: '8080' },
endpoints: [
{
path: 'smoke/swagger',
httpMethod: 'GET',
extra: {},
inner: false,
userAuthRequired: false
}
]
}
]
}
await page.route('**/api/**', (route) => {
const pathname = new URL(route.request().url()).pathname
let data = []
if (pathname.endsWith('/get_profile'))
data = {
email: 'smoke@example.test',
firstName: 'Тест',
lastName: 'Обновлений',
role: 'ADMIN',
roles: [1],
roleNames: ['Администратор'],
permissions: [
'profile_view',
'module_view',
'module_configuration_add',
'module_configuration_edit'
],
idleTimeoutMs: 3600000
}
else if (pathname.endsWith('/get_design'))
data = { name: 'Dependency smoke', primaryColor: '#1677ff' }
else if (pathname.endsWith('/get_modules_info')) data = [module]
else if (pathname.endsWith('/get_by_module_id')) data = { schema }
else if (pathname.endsWith('/get_config_by_id'))
data = {
id: '7',
moduleId: '1',
name: 'Monaco regression',
data: { payload: { smokeField: 'initial' } },
active: false,
commonConfigs: [],
version: 1,
valid: true,
description: '',
createdAt: '2026-01-01T00:00:00Z',
updatedAt: '2026-01-01T00:00:00Z'
}
else if (pathname.endsWith('/smoke/swagger'))
data = {
openapi: '3.0.3',
info: {
title: 'Dependency smoke API',
version: '1.0.0',
description:
'```mermaid\\nflowchart LR\\n Browser-->API\\n```'.replaceAll(
'\\n',
'\n'
)
},
paths: {
'/ping': {
get: {
summary: 'Ping',
responses: { 200: { description: 'OK' } }
}
}
}
}
return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify(data)
})
})
await page.goto(url + '/modules/1/configurations', {
waitUntil: 'networkidle'
})
await page
.getByRole('button', { name: 'Текущая схема', exact: true })
.click({ timeout: 30000 })
const dialog = page.getByRole('dialog', { name: 'Текущая схема' })
await dialog
.getByText('smokeField', { exact: false })
.first()
.waitFor({ timeout: 20000 })
if (await dialog.getByText('Не удалось отобразить схему').count())
throw Error('Schema parser failed')
reports.push({
width,
schema: 'internal $ref resolved in production bundle'
})
await page.goto(url + '/modules/1/swagger', { waitUntil: 'networkidle' })
await page.locator('.swagger-page__mermaid svg').waitFor({ timeout: 30000 })
if (errors.length) throw Error(JSON.stringify(errors))
reports.push({
width,
redoc: 'rendered',
mermaid: 'SVG rendered',
uncaughtErrors: 0
})
const workers = []
page.on('worker', (worker) => workers.push(worker.url()))
await page.goto(url + '/1/configEditor/7', { waitUntil: 'networkidle' })
await page
.getByText('Редактор кода', { exact: true })
.click({ timeout: 20000 })
const editor = page.locator('.monaco-editor .view-lines').first()
await editor.waitFor({ timeout: 20000 })
await editor.click()
await page.keyboard.press('ControlOrMeta+A')
await page.keyboard.insertText('{"payload":{"smokeField":42}}')
await page
.locator('.monaco-editor .squiggly-error')
.first()
.waitFor({ timeout: 30000 })
if (!workers.some((url) => url.includes('json.worker')))
throw Error('JSON worker did not start')
if (
await page
.getByText('Unexpected Application Error!', { exact: false })
.count()
)
throw Error('Configuration editor crashed')
if (errors.length) throw Error(JSON.stringify(errors))
reports.push({
width,
configurationEditor: 'mounted',
schemaValidation: 'type error highlighted by real JSON worker',
uncaughtErrors: 0
})
await page.close()
}
console.log(JSON.stringify(reports, null, 2))
} finally {
await browser.close()
await new Promise((resolve) => server.close(resolve))
}
+13 -14
View File
@@ -19,21 +19,20 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"baseUrl": ".",
"paths": {
"@assets/*": ["src/assets/*"],
"@constants/*": ["src/constants/*"],
"@ui/*": ["src/ui/*"],
"@widgets/*": ["src/widgets/*"],
"@components/*": ["src/components/*"],
"@modules/*": ["src/modules/*"],
"@hooks/*": ["src/hooks/*"],
"@pages/*": ["src/pages/*"],
"@services/*": ["src/services/*"],
"@stores/*": ["src/stores/*"],
"@type/*": ["src/type/*"],
"@utils/*": ["src/utils/*"],
"@routes/*": ["src/routes/*"]
"@assets/*": ["./src/assets/*"],
"@constants/*": ["./src/constants/*"],
"@ui/*": ["./src/ui/*"],
"@widgets/*": ["./src/widgets/*"],
"@components/*": ["./src/components/*"],
"@modules/*": ["./src/modules/*"],
"@hooks/*": ["./src/hooks/*"],
"@pages/*": ["./src/pages/*"],
"@services/*": ["./src/services/*"],
"@stores/*": ["./src/stores/*"],
"@type/*": ["./src/type/*"],
"@utils/*": ["./src/utils/*"],
"@routes/*": ["./src/routes/*"]
},
"allowSyntheticDefaultImports": true
},
+16
View File
@@ -0,0 +1,16 @@
# UI packages for redesign alpha
Both archives are installed from this directory. Their exact integrity values are also pinned in package-lock.json. No npm release was published.
| Archive | Source branch | Source commit | SHA-256 |
| --- | --- | --- | --- |
| isp-ui-kit-3.0.1.tgz | column-redesign | [3a8b1a1](https://gitlab.txix.ru/isp/isp-ui-kit/-/commit/3a8b1a1924d82747518c4c81e48cd16e62a1f6eb) | 2e2149801cba5198f4db0a0bb9fd07d362d4e87f659971b73320ffd643607ae3 |
| isp-admin-ui-kit-3.0.0.tgz | redesign-form-saving | [053aa80](https://gitlab.txix.ru/isp/isp-admin-ui-kit/-/commit/053aa807f2fcc59b6a610c20c8679b8270d255c2) | 8ab17713ccd23fff25e94fb77f3c4faf8bd8032dd54d1d0e183cab270a026a6b |
Use Node.js 24 (nvm use), npm ci and npm run build. Docker copies vendor before installing dependencies.
To refresh: build isp-ui-kit with npm run build and pack it with npm pack --ignore-scripts; build isp-admin-ui-kit with npm run build:prod and pack it with npm pack --ignore-scripts. Copy both archives here and install them explicitly to update lockfile integrity values.
The admin kit declares the base kit as a peer dependency. Its development dependency is pinned to a Git commit; no vendor archive is stored in the admin-kit repository. The application installs both archives directly, without cloning Git repositories during installation.
The admin archive contains production CJS/ESM bundles and TypeScript declarations without source maps or test fixtures.
Binary file not shown.
BIN
View File
Binary file not shown.
+6 -21
View File
@@ -1,8 +1,5 @@
import react from '@vitejs/plugin-react'
import { defineConfig, loadEnv } from 'vite'
import svgr from 'vite-plugin-svgr'
import tsconfigPaths from 'vite-tsconfig-paths'
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
@@ -10,29 +7,19 @@ export default defineConfig(({ mode }) => {
return {
base: env.PUBLIC_PATH || '/',
resolve: { tsconfigPaths: true },
optimizeDeps: { exclude: [] },
resolve: {
alias: {
path: 'path-browserify',
http: 'stream-http',
url: 'url/',
process: 'process/browser'
}
},
define: {
__APP_ENV__: env.APP_ENV,
APP_VERSION: JSON.stringify(process.env.npm_package_version)
},
build: {
minify: 'esbuild',
target: 'es2020',
minify: 'oxc',
sourcemap: mode !== 'production',
outDir: 'build',
chunkSizeWarningLimit: 1600,
commonjsOptions: { transformMixedEsModules: true },
esbuild: {
target: 'es2020',
legalComments: 'none'
}
rolldownOptions: { output: { comments: { legal: false } } }
},
server: {
watch: {
@@ -41,10 +28,8 @@ export default defineConfig(({ mode }) => {
host: true,
strictPort: true,
port: 8000,
proxy: {
'/api': env.PROXY_URL
}
proxy: env.PROXY_URL ? { '/api': env.PROXY_URL } : undefined
},
plugins: [react(), svgr(), tsconfigPaths()]
plugins: [react()]
}
})