Open History to see the last commit
1import { readFile } from 'node:fs/promises'
2import { fileURLToPath } from 'node:url'
3import { compile } from 'octane/compiler'
4β
5const componentUrls = [
6 new URL('../src/HydrationBoundary.tsrx', import.meta.url),
7 new URL('../src/QueryClientProvider.tsrx', import.meta.url),
8 new URL('../src/QueryErrorResetBoundary.tsrx', import.meta.url),
9]
10β
11for (const componentUrl of componentUrls) {
12 const filename = fileURLToPath(componentUrl)
13 const source = await readFile(componentUrl, 'utf8')
14β
15 compile(source, filename, { mode: 'client' })
16 compile(source, filename, { mode: 'server' })
17}