From 9d901be8f0a09e66c1bf3eb790dc5afdbfc1d4dd Mon Sep 17 00:00:00 2001 From: Yimin-Jin <139844715+Yimin-Jin@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:08:04 +0000 Subject: [PATCH 1/2] fix: add global definition in vite config (#1368) --- hello-world-bot-with-tab/tab/vite.config.ts | 3 +++ hello-world-teams-tab-and-outlook-add-in/tab/vite.config.ts | 3 +++ intelligent-data-chart-generator/vite.config.ts | 3 +++ team-central-dashboard/vite.config.ts | 4 +++- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hello-world-bot-with-tab/tab/vite.config.ts b/hello-world-bot-with-tab/tab/vite.config.ts index 75086e29..a04f8ee0 100644 --- a/hello-world-bot-with-tab/tab/vite.config.ts +++ b/hello-world-bot-with-tab/tab/vite.config.ts @@ -6,6 +6,9 @@ export default defineConfig({ plugins: [react()], server: { port: 53000, + define: { + global: 'globalThis', + }, https: { cert: process.env.SSL_CRT_FILE ? fs.readFileSync(process.env.SSL_CRT_FILE) : undefined, key: process.env.SSL_KEY_FILE ? fs.readFileSync(process.env.SSL_KEY_FILE) : undefined, diff --git a/hello-world-teams-tab-and-outlook-add-in/tab/vite.config.ts b/hello-world-teams-tab-and-outlook-add-in/tab/vite.config.ts index 75086e29..a04f8ee0 100644 --- a/hello-world-teams-tab-and-outlook-add-in/tab/vite.config.ts +++ b/hello-world-teams-tab-and-outlook-add-in/tab/vite.config.ts @@ -6,6 +6,9 @@ export default defineConfig({ plugins: [react()], server: { port: 53000, + define: { + global: 'globalThis', + }, https: { cert: process.env.SSL_CRT_FILE ? fs.readFileSync(process.env.SSL_CRT_FILE) : undefined, key: process.env.SSL_KEY_FILE ? fs.readFileSync(process.env.SSL_KEY_FILE) : undefined, diff --git a/intelligent-data-chart-generator/vite.config.ts b/intelligent-data-chart-generator/vite.config.ts index c2c269f4..847a6ef4 100644 --- a/intelligent-data-chart-generator/vite.config.ts +++ b/intelligent-data-chart-generator/vite.config.ts @@ -6,6 +6,9 @@ export default defineConfig({ plugins: [react()], server: { port: 53000, + define: { + global: 'globalThis', + }, https: { cert: process.env.SSL_CRT_FILE ? fs.readFileSync(process.env.SSL_CRT_FILE) : undefined, key: process.env.SSL_KEY_FILE ? fs.readFileSync(process.env.SSL_KEY_FILE) : undefined, diff --git a/team-central-dashboard/vite.config.ts b/team-central-dashboard/vite.config.ts index 312e17d1..847a6ef4 100644 --- a/team-central-dashboard/vite.config.ts +++ b/team-central-dashboard/vite.config.ts @@ -6,7 +6,9 @@ export default defineConfig({ plugins: [react()], server: { port: 53000, - // if you are using SSL + define: { + global: 'globalThis', + }, https: { cert: process.env.SSL_CRT_FILE ? fs.readFileSync(process.env.SSL_CRT_FILE) : undefined, key: process.env.SSL_KEY_FILE ? fs.readFileSync(process.env.SSL_KEY_FILE) : undefined, From 3e92d6a69cf4a4a2de6d2472eb5f4fcd9b14e3c7 Mon Sep 17 00:00:00 2001 From: Yimin-Jin <139844715+Yimin-Jin@users.noreply.github.com> Date: Fri, 29 Nov 2024 02:57:03 +0000 Subject: [PATCH 2/2] fix: fix global definition in vite config (#1369) --- hello-world-bot-with-tab/tab/vite.config.ts | 6 +++--- hello-world-teams-tab-and-outlook-add-in/tab/vite.config.ts | 6 +++--- intelligent-data-chart-generator/vite.config.ts | 6 +++--- team-central-dashboard/vite.config.ts | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hello-world-bot-with-tab/tab/vite.config.ts b/hello-world-bot-with-tab/tab/vite.config.ts index a04f8ee0..f59da272 100644 --- a/hello-world-bot-with-tab/tab/vite.config.ts +++ b/hello-world-bot-with-tab/tab/vite.config.ts @@ -4,11 +4,11 @@ import fs from "fs"; export default defineConfig({ plugins: [react()], + define: { + global: 'globalThis', + }, server: { port: 53000, - define: { - global: 'globalThis', - }, https: { cert: process.env.SSL_CRT_FILE ? fs.readFileSync(process.env.SSL_CRT_FILE) : undefined, key: process.env.SSL_KEY_FILE ? fs.readFileSync(process.env.SSL_KEY_FILE) : undefined, diff --git a/hello-world-teams-tab-and-outlook-add-in/tab/vite.config.ts b/hello-world-teams-tab-and-outlook-add-in/tab/vite.config.ts index a04f8ee0..f59da272 100644 --- a/hello-world-teams-tab-and-outlook-add-in/tab/vite.config.ts +++ b/hello-world-teams-tab-and-outlook-add-in/tab/vite.config.ts @@ -4,11 +4,11 @@ import fs from "fs"; export default defineConfig({ plugins: [react()], + define: { + global: 'globalThis', + }, server: { port: 53000, - define: { - global: 'globalThis', - }, https: { cert: process.env.SSL_CRT_FILE ? fs.readFileSync(process.env.SSL_CRT_FILE) : undefined, key: process.env.SSL_KEY_FILE ? fs.readFileSync(process.env.SSL_KEY_FILE) : undefined, diff --git a/intelligent-data-chart-generator/vite.config.ts b/intelligent-data-chart-generator/vite.config.ts index 847a6ef4..bf2d6164 100644 --- a/intelligent-data-chart-generator/vite.config.ts +++ b/intelligent-data-chart-generator/vite.config.ts @@ -4,11 +4,11 @@ import fs from "fs"; export default defineConfig({ plugins: [react()], + define: { + global: 'globalThis', + }, server: { port: 53000, - define: { - global: 'globalThis', - }, https: { cert: process.env.SSL_CRT_FILE ? fs.readFileSync(process.env.SSL_CRT_FILE) : undefined, key: process.env.SSL_KEY_FILE ? fs.readFileSync(process.env.SSL_KEY_FILE) : undefined, diff --git a/team-central-dashboard/vite.config.ts b/team-central-dashboard/vite.config.ts index 847a6ef4..bf2d6164 100644 --- a/team-central-dashboard/vite.config.ts +++ b/team-central-dashboard/vite.config.ts @@ -4,11 +4,11 @@ import fs from "fs"; export default defineConfig({ plugins: [react()], + define: { + global: 'globalThis', + }, server: { port: 53000, - define: { - global: 'globalThis', - }, https: { cert: process.env.SSL_CRT_FILE ? fs.readFileSync(process.env.SSL_CRT_FILE) : undefined, key: process.env.SSL_KEY_FILE ? fs.readFileSync(process.env.SSL_KEY_FILE) : undefined,