From 64b413ab453d98e01d778166647c19cbf3074e50 Mon Sep 17 00:00:00 2001 From: Fabien Arcellier Date: Thu, 15 Aug 2024 07:39:19 +0200 Subject: [PATCH] fix: npm run custom.dev run dev server started instead of custom.dev --- package.json | 2 +- src/ui/vite.config.custom.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8ea98e1d8..2d749778c 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "dev": "npm run -w writer-ui dev", "storybook": "npm run -w writer-ui storybook", "storybook.build": "npm run -w writer-ui storybook.build", - "custom.dev": "npm run -w writer-ui dev", + "custom.dev": "npm run -w writer-ui custom.dev", "cli:test": "pytest tests -o log_cli=true ", "cli:lint": "mypy ./src/writer --exclude app_templates/* && ruff check", diff --git a/src/ui/vite.config.custom.ts b/src/ui/vite.config.custom.ts index 9d0ecd30c..149cbbdba 100644 --- a/src/ui/vite.config.custom.ts +++ b/src/ui/vite.config.custom.ts @@ -12,6 +12,11 @@ export default defineConfig({ WRITER_LIVE_CCT: JSON.stringify("yes"), }, publicDir: false, + optimizeDeps: { + esbuildOptions: { + target: "es2022", + }, + }, build: { lib: { entry: ["./src/custom_components"], @@ -46,6 +51,7 @@ export default defineConfig({ }, }, server: { + port: 5174, proxy: { "/api": { target: "http://127.0.0.1:5000",