mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
add scope
This commit is contained in:
parent
1112f79cf5
commit
06819e172a
3 changed files with 7 additions and 4 deletions
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ const Sidebar = () => {
|
|||
const { isHistoryOpen, currentTab: tab } = sidebarState
|
||||
useEffect(() => { sidebarStateService.onDidChangeState(() => setSideBarState(sidebarStateService.state)) }, [sidebarStateService])
|
||||
|
||||
return <>
|
||||
return <div className='@@void-scope'>
|
||||
<div className={`flex flex-col h-screen w-full`}>
|
||||
|
||||
<span onClick={() => {
|
||||
|
|
@ -38,7 +38,7 @@ const Sidebar = () => {
|
|||
</div>
|
||||
|
||||
</div>
|
||||
</>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue