From 06819e172aeae9574420f7f8167962469f341739 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 11 Nov 2024 03:04:48 -0800 Subject: [PATCH] add scope --- src/vs/workbench/contrib/void/browser/react/build.js | 2 +- .../contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx | 4 ++-- src/vs/workbench/contrib/void/browser/react/tsup.config.js | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/build.js b/src/vs/workbench/contrib/void/browser/react/build.js index a6c0fb86..84f2233d 100755 --- a/src/vs/workbench/contrib/void/browser/react/build.js +++ b/src/vs/workbench/contrib/void/browser/react/build.js @@ -1,7 +1,7 @@ import { execSync } from 'child_process'; // tsup to build all react to out/ -execSync('npx scope-tailwind ./sidebar-tsx -c styles.css') +execSync('npx scope-tailwind ./src -o src2/ -s void-scope -c styles.css') // build tailwind -> styles.css execSync('tsup') diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx index bb8ac031..c1340fef 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx @@ -16,7 +16,7 @@ const Sidebar = () => { const { isHistoryOpen, currentTab: tab } = sidebarState useEffect(() => { sidebarStateService.onDidChangeState(() => setSideBarState(sidebarStateService.state)) }, [sidebarStateService]) - return <> + return
{ @@ -38,7 +38,7 @@ const Sidebar = () => {
- + } diff --git a/src/vs/workbench/contrib/void/browser/react/tsup.config.js b/src/vs/workbench/contrib/void/browser/react/tsup.config.js index 22c79ea8..b084a8d5 100644 --- a/src/vs/workbench/contrib/void/browser/react/tsup.config.js +++ b/src/vs/workbench/contrib/void/browser/react/tsup.config.js @@ -2,7 +2,7 @@ import { defineConfig } from 'tsup' export default defineConfig({ entry: [ - './sidebar-tsx/Sidebar.tsx' + './src2/sidebar-tsx/Sidebar.tsx' ], outDir: './out', format: ['esm'], @@ -21,4 +21,7 @@ export default defineConfig({ .replaceAll('*', '.*')) ], treeshake: true, + esbuildOptions(options) { + options.outbase = 'out' // This tells esbuild to use src2 as the base for output paths + } })