@lexibase/rdx-next 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/bin/cli.d.mts +2 -0
- package/bin/cli.mjs +129 -0
- package/bin/plugin-config.mjs +5 -1
- package/bin/rdx.mjs +2 -121
- package/config.d.mts +3 -0
- package/config.mjs +27 -1
- package/dist/runtime/index.js +9 -6
- package/package.json +14 -8
- package/templates/runtime/next.config.mjs +4 -3
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
The official Next.js runtime for RDX documentation projects.
|
|
4
4
|
|
|
5
|
+
Generated projects use the main `@lexibase/rdx` package. This adapter remains
|
|
6
|
+
available for advanced integrations. It declares the shared UI as a compatible
|
|
7
|
+
peer dependency rather than owning a fixed UI copy. The main package supplies
|
|
8
|
+
the selected UI; direct adapter consumers must install a compatible UI themselves.
|
|
9
|
+
|
|
5
10
|
Requires Node.js 22.18+ (22.x) or 24.11+ (24.x). Use the latest patch of either line.
|
|
6
11
|
The MDX renderer keeps JavaScript expression blocking enabled. Markdown, fenced
|
|
7
12
|
code and registered JSX components with literal props remain supported, but
|
package/bin/cli.d.mts
ADDED
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process'
|
|
2
|
+
import { createRequire } from 'node:module'
|
|
3
|
+
import { access, cp, mkdir } from 'node:fs/promises'
|
|
4
|
+
import path from 'node:path'
|
|
5
|
+
import { fileURLToPath } from 'node:url'
|
|
6
|
+
import process from 'node:process'
|
|
7
|
+
|
|
8
|
+
import { createRdxProject } from '@lexibase/rdx-core/config'
|
|
9
|
+
import { createJiti } from 'jiti'
|
|
10
|
+
|
|
11
|
+
import { preparePublicAssets } from './public-assets.mjs'
|
|
12
|
+
|
|
13
|
+
export async function runRdxCli({ templateDir } = {}) {
|
|
14
|
+
const supportedCommands = new Set(['dev', 'build', 'start'])
|
|
15
|
+
let command = process.argv[2]
|
|
16
|
+
const commandArgs = process.argv.slice(3)
|
|
17
|
+
const projectRoot = process.cwd()
|
|
18
|
+
const packageRoot = path.resolve(
|
|
19
|
+
path.dirname(fileURLToPath(import.meta.url)),
|
|
20
|
+
'..'
|
|
21
|
+
)
|
|
22
|
+
const runtimeTemplate =
|
|
23
|
+
templateDir ?? path.join(packageRoot, 'templates', 'runtime')
|
|
24
|
+
const runtimeDirectory = path.join(projectRoot, '.rdx')
|
|
25
|
+
|
|
26
|
+
async function prepareRuntime() {
|
|
27
|
+
await mkdir(runtimeDirectory, { recursive: true })
|
|
28
|
+
await preparePublicAssets(projectRoot, runtimeDirectory)
|
|
29
|
+
await cp(runtimeTemplate, runtimeDirectory, {
|
|
30
|
+
force: true,
|
|
31
|
+
recursive: true,
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function main() {
|
|
36
|
+
if (!command || command === 'help' || command === '--help') {
|
|
37
|
+
console.log('Usage: rdx <dev|build|start|prepare|add|plugin-command>')
|
|
38
|
+
console.log(' rdx add versioning [--package-manager npm|pnpm|yarn]')
|
|
39
|
+
console.log(
|
|
40
|
+
'Plugin commands are registered through plugins in rdx.config.ts.'
|
|
41
|
+
)
|
|
42
|
+
return
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (command === 'add') {
|
|
46
|
+
const { addVersioning, parseAddArguments } =
|
|
47
|
+
await import('./add-plugin.mjs')
|
|
48
|
+
const options = parseAddArguments(commandArgs)
|
|
49
|
+
await addVersioning(projectRoot, options)
|
|
50
|
+
command = 'prepare'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const configPath = path.join(projectRoot, 'rdx.config.ts')
|
|
54
|
+
try {
|
|
55
|
+
await access(configPath)
|
|
56
|
+
} catch {
|
|
57
|
+
throw new Error(
|
|
58
|
+
`Missing ${configPath}. Run rdx from the documentation project root.`
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const jiti = createJiti(import.meta.url, {
|
|
63
|
+
moduleCache: false,
|
|
64
|
+
fsCache: false,
|
|
65
|
+
jsx: { runtime: 'automatic' },
|
|
66
|
+
})
|
|
67
|
+
let input
|
|
68
|
+
try {
|
|
69
|
+
input = await jiti.import(configPath, { default: true })
|
|
70
|
+
} catch (error) {
|
|
71
|
+
const hint =
|
|
72
|
+
error.code === 'MODULE_NOT_FOUND' ||
|
|
73
|
+
error.code === 'ERR_MODULE_NOT_FOUND'
|
|
74
|
+
? ' If a configured plugin cannot be resolved, install its package in this project.'
|
|
75
|
+
: ''
|
|
76
|
+
throw new Error(`Could not load rdx.config.ts: ${error.message}${hint}`)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const project = await createRdxProject(input, {
|
|
80
|
+
rootDir: projectRoot,
|
|
81
|
+
command,
|
|
82
|
+
})
|
|
83
|
+
if (command === 'prepare') {
|
|
84
|
+
await prepareRuntime()
|
|
85
|
+
console.log('RDX runtime prepared in .rdx/')
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
if (!supportedCommands.has(command)) {
|
|
89
|
+
const pluginCommand = project.commands.find(
|
|
90
|
+
(entry) => entry.name === command
|
|
91
|
+
)
|
|
92
|
+
if (!pluginCommand)
|
|
93
|
+
throw new Error(
|
|
94
|
+
`Unknown command "${command}". Available: dev, build, start, prepare, add${project.commands.map((entry) => `, ${entry.name}`).join('')}. Install and configure the plugin that provides this command.`
|
|
95
|
+
)
|
|
96
|
+
await pluginCommand.run({
|
|
97
|
+
rootDir: projectRoot,
|
|
98
|
+
config: project.config,
|
|
99
|
+
command,
|
|
100
|
+
args: commandArgs,
|
|
101
|
+
})
|
|
102
|
+
return
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
await prepareRuntime()
|
|
106
|
+
const projectRequire = createRequire(path.join(projectRoot, 'package.json'))
|
|
107
|
+
const nextCli = projectRequire.resolve('next/dist/bin/next')
|
|
108
|
+
const child = spawn(
|
|
109
|
+
process.execPath,
|
|
110
|
+
[nextCli, command, runtimeDirectory, ...commandArgs],
|
|
111
|
+
{ cwd: projectRoot, stdio: 'inherit' }
|
|
112
|
+
)
|
|
113
|
+
child.on('error', (error) => {
|
|
114
|
+
console.error(`[RDX] Could not start Next.js: ${error.message}`)
|
|
115
|
+
process.exitCode = 1
|
|
116
|
+
})
|
|
117
|
+
child.on('exit', (code, signal) => {
|
|
118
|
+
if (signal) process.kill(process.pid, signal)
|
|
119
|
+
process.exit(code ?? 1)
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
await main()
|
|
125
|
+
} catch (error) {
|
|
126
|
+
console.error(`[RDX] ${error.message}`)
|
|
127
|
+
process.exitCode = 1
|
|
128
|
+
}
|
|
129
|
+
}
|
package/bin/plugin-config.mjs
CHANGED
|
@@ -36,7 +36,11 @@ export function activateVersioning(source) {
|
|
|
36
36
|
if (specifier.isTypeOnly) continue
|
|
37
37
|
const imported = (specifier.propertyName ?? specifier.name).text
|
|
38
38
|
if (
|
|
39
|
-
[
|
|
39
|
+
[
|
|
40
|
+
'@lexibase/rdx',
|
|
41
|
+
'@lexibase/rdx-next',
|
|
42
|
+
'@lexibase/rdx-core/config',
|
|
43
|
+
].includes(name) &&
|
|
40
44
|
imported === 'defineConfig'
|
|
41
45
|
)
|
|
42
46
|
definitions.add(specifier.name.text)
|
package/bin/rdx.mjs
CHANGED
|
@@ -1,124 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { createRequire } from 'node:module'
|
|
5
|
-
import { access, cp, mkdir } from 'node:fs/promises'
|
|
6
|
-
import path from 'node:path'
|
|
7
|
-
import { fileURLToPath } from 'node:url'
|
|
8
|
-
import process from 'node:process'
|
|
3
|
+
import { runRdxCli } from './cli.mjs'
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
import { createJiti } from 'jiti'
|
|
12
|
-
|
|
13
|
-
import { preparePublicAssets } from './public-assets.mjs'
|
|
14
|
-
|
|
15
|
-
const supportedCommands = new Set(['dev', 'build', 'start'])
|
|
16
|
-
let command = process.argv[2]
|
|
17
|
-
const commandArgs = process.argv.slice(3)
|
|
18
|
-
const projectRoot = process.cwd()
|
|
19
|
-
const packageRoot = path.resolve(
|
|
20
|
-
path.dirname(fileURLToPath(import.meta.url)),
|
|
21
|
-
'..'
|
|
22
|
-
)
|
|
23
|
-
const runtimeTemplate = path.join(packageRoot, 'templates', 'runtime')
|
|
24
|
-
const runtimeDirectory = path.join(projectRoot, '.rdx')
|
|
25
|
-
|
|
26
|
-
async function prepareRuntime() {
|
|
27
|
-
await mkdir(runtimeDirectory, { recursive: true })
|
|
28
|
-
await preparePublicAssets(projectRoot, runtimeDirectory)
|
|
29
|
-
await cp(runtimeTemplate, runtimeDirectory, { force: true, recursive: true })
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async function main() {
|
|
33
|
-
if (!command || command === 'help' || command === '--help') {
|
|
34
|
-
console.log('Usage: rdx <dev|build|start|prepare|add|plugin-command>')
|
|
35
|
-
console.log(' rdx add versioning [--package-manager npm|pnpm|yarn]')
|
|
36
|
-
console.log(
|
|
37
|
-
'Plugin commands are registered through plugins in rdx.config.ts.'
|
|
38
|
-
)
|
|
39
|
-
return
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (command === 'add') {
|
|
43
|
-
const { addVersioning, parseAddArguments } =
|
|
44
|
-
await import('./add-plugin.mjs')
|
|
45
|
-
const options = parseAddArguments(commandArgs)
|
|
46
|
-
await addVersioning(projectRoot, options)
|
|
47
|
-
command = 'prepare'
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const configPath = path.join(projectRoot, 'rdx.config.ts')
|
|
51
|
-
try {
|
|
52
|
-
await access(configPath)
|
|
53
|
-
} catch {
|
|
54
|
-
throw new Error(
|
|
55
|
-
`Missing ${configPath}. Run rdx from the documentation project root.`
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const jiti = createJiti(import.meta.url, {
|
|
60
|
-
moduleCache: false,
|
|
61
|
-
fsCache: false,
|
|
62
|
-
jsx: { runtime: 'automatic' },
|
|
63
|
-
})
|
|
64
|
-
let input
|
|
65
|
-
try {
|
|
66
|
-
input = await jiti.import(configPath, { default: true })
|
|
67
|
-
} catch (error) {
|
|
68
|
-
const hint =
|
|
69
|
-
error.code === 'MODULE_NOT_FOUND' || error.code === 'ERR_MODULE_NOT_FOUND'
|
|
70
|
-
? ' If a configured plugin cannot be resolved, install its package in this project.'
|
|
71
|
-
: ''
|
|
72
|
-
throw new Error(`Could not load rdx.config.ts: ${error.message}${hint}`)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
const project = await createRdxProject(input, {
|
|
76
|
-
rootDir: projectRoot,
|
|
77
|
-
command,
|
|
78
|
-
})
|
|
79
|
-
if (command === 'prepare') {
|
|
80
|
-
await prepareRuntime()
|
|
81
|
-
console.log('RDX runtime prepared in .rdx/')
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
if (!supportedCommands.has(command)) {
|
|
85
|
-
const pluginCommand = project.commands.find(
|
|
86
|
-
(entry) => entry.name === command
|
|
87
|
-
)
|
|
88
|
-
if (!pluginCommand)
|
|
89
|
-
throw new Error(
|
|
90
|
-
`Unknown command "${command}". Available: dev, build, start, prepare, add${project.commands.map((entry) => `, ${entry.name}`).join('')}. Install and configure the plugin that provides this command.`
|
|
91
|
-
)
|
|
92
|
-
await pluginCommand.run({
|
|
93
|
-
rootDir: projectRoot,
|
|
94
|
-
config: project.config,
|
|
95
|
-
command,
|
|
96
|
-
args: commandArgs,
|
|
97
|
-
})
|
|
98
|
-
return
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
await prepareRuntime()
|
|
102
|
-
const projectRequire = createRequire(path.join(projectRoot, 'package.json'))
|
|
103
|
-
const nextCli = projectRequire.resolve('next/dist/bin/next')
|
|
104
|
-
const child = spawn(
|
|
105
|
-
process.execPath,
|
|
106
|
-
[nextCli, command, runtimeDirectory, ...commandArgs],
|
|
107
|
-
{ cwd: projectRoot, stdio: 'inherit' }
|
|
108
|
-
)
|
|
109
|
-
child.on('error', (error) => {
|
|
110
|
-
console.error(`[RDX] Could not start Next.js: ${error.message}`)
|
|
111
|
-
process.exitCode = 1
|
|
112
|
-
})
|
|
113
|
-
child.on('exit', (code, signal) => {
|
|
114
|
-
if (signal) process.kill(process.pid, signal)
|
|
115
|
-
process.exit(code ?? 1)
|
|
116
|
-
})
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
try {
|
|
120
|
-
await main()
|
|
121
|
-
} catch (error) {
|
|
122
|
-
console.error(`[RDX] ${error.message}`)
|
|
123
|
-
process.exitCode = 1
|
|
124
|
-
}
|
|
5
|
+
await runRdxCli()
|
package/config.d.mts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** Common build root for the documentation project and its installed Next.js. */
|
|
2
|
+
export function getRdxBuildRoot(rootDir: string): Promise<string>
|
|
3
|
+
|
|
1
4
|
/** Explicit deployment files for a native Next.js application using RDX. */
|
|
2
5
|
export function getRdxTracingConfig(options: {
|
|
3
6
|
rootDir: string
|
package/config.mjs
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
|
-
import { readdir, stat } from 'node:fs/promises'
|
|
1
|
+
import { readdir, realpath, stat } from 'node:fs/promises'
|
|
2
|
+
import { createRequire } from 'node:module'
|
|
2
3
|
import path from 'node:path'
|
|
3
4
|
|
|
4
5
|
import { createRdxProject, resolveProjectPath } from '@lexibase/rdx-core/config'
|
|
5
6
|
import { createJiti } from 'jiti'
|
|
6
7
|
|
|
8
|
+
/** Include the project and the real Next.js installation in Turbopack's root. */
|
|
9
|
+
export async function getRdxBuildRoot(rootDir) {
|
|
10
|
+
const projectRoot = await realpath(path.resolve(rootDir))
|
|
11
|
+
const require = createRequire(path.join(projectRoot, 'package.json'))
|
|
12
|
+
const nextRoot = path.dirname(
|
|
13
|
+
await realpath(require.resolve('next/package.json'))
|
|
14
|
+
)
|
|
15
|
+
let root = projectRoot
|
|
16
|
+
while (true) {
|
|
17
|
+
const relative = path.relative(root, nextRoot)
|
|
18
|
+
if (
|
|
19
|
+
!path.isAbsolute(relative) &&
|
|
20
|
+
relative !== '..' &&
|
|
21
|
+
!relative.startsWith(`..${path.sep}`)
|
|
22
|
+
)
|
|
23
|
+
return root
|
|
24
|
+
const parent = path.dirname(root)
|
|
25
|
+
if (parent === root || parent === path.parse(parent).root)
|
|
26
|
+
throw new Error(
|
|
27
|
+
'RDX could not determine a bounded build root. Install Next.js inside the project or its workspace.'
|
|
28
|
+
)
|
|
29
|
+
root = parent
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
7
33
|
// These files are enumerated by Next's configuration loader, not by a server
|
|
8
34
|
// bundle. The core's dynamic readers deliberately leave tracing to this adapter.
|
|
9
35
|
async function contentFiles(directory) {
|
package/dist/runtime/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import { DocsSidebar } from "@lexibase/rdx-ui/components/docs-sidebar";
|
|
|
11
11
|
import { DocsToc } from "@lexibase/rdx-ui/components/docs-toc";
|
|
12
12
|
import { DocsSearch } from "@lexibase/rdx-ui/components/docs-search";
|
|
13
13
|
import { Home } from "@lexibase/rdx-ui/components/home";
|
|
14
|
+
import { FooterCredit } from "@lexibase/rdx-ui/components/footer-credit";
|
|
14
15
|
import { Logo } from "@lexibase/rdx-ui/components/logo";
|
|
15
16
|
import { mdxComponents } from "@lexibase/rdx-ui/components/mdx-components";
|
|
16
17
|
import { Navbar } from "@lexibase/rdx-ui/components/navbar";
|
|
@@ -93,6 +94,7 @@ function getDocumentMetadata({
|
|
|
93
94
|
}
|
|
94
95
|
function getRdxMetadata(config) {
|
|
95
96
|
const { metadataBase, ...metadata } = config.metadata;
|
|
97
|
+
delete metadata.since;
|
|
96
98
|
const name = metadata.applicationName;
|
|
97
99
|
return {
|
|
98
100
|
title: { default: name, template: `%s | ${name}` },
|
|
@@ -308,12 +310,13 @@ async function DocsPage({
|
|
|
308
310
|
}
|
|
309
311
|
) : /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", disabled: true, children: "Next" })
|
|
310
312
|
] }),
|
|
311
|
-
/* @__PURE__ */ jsx(
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
313
|
+
/* @__PURE__ */ jsx(
|
|
314
|
+
FooterCredit,
|
|
315
|
+
{
|
|
316
|
+
name: project.config.metadata.applicationName,
|
|
317
|
+
since: project.config.metadata.since
|
|
318
|
+
}
|
|
319
|
+
)
|
|
317
320
|
] })
|
|
318
321
|
]
|
|
319
322
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lexibase/rdx-next",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "The Next.js runtime for RDX documentation projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"rdx": "./bin/rdx.mjs"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
|
+
"./package.json": "./package.json",
|
|
15
|
+
"./cli": {
|
|
16
|
+
"types": "./bin/cli.d.mts",
|
|
17
|
+
"import": "./bin/cli.mjs"
|
|
18
|
+
},
|
|
14
19
|
"./config": {
|
|
15
20
|
"types": "./config.d.mts",
|
|
16
21
|
"import": "./config.mjs"
|
|
@@ -46,11 +51,11 @@
|
|
|
46
51
|
"next-mdx-remote": "^6.0.0",
|
|
47
52
|
"remark-gfm": "^4",
|
|
48
53
|
"typescript": "6.0.3",
|
|
49
|
-
"@lexibase/rdx-
|
|
50
|
-
"@lexibase/rdx-
|
|
51
|
-
"@lexibase/rdx-ui": "1.0.0"
|
|
54
|
+
"@lexibase/rdx-core": "1.1.0",
|
|
55
|
+
"@lexibase/rdx-types": "1.1.0"
|
|
52
56
|
},
|
|
53
57
|
"peerDependencies": {
|
|
58
|
+
"@lexibase/rdx-ui": "^1.1.0",
|
|
54
59
|
"next": "^16.4.2",
|
|
55
60
|
"react": "^19.3.1",
|
|
56
61
|
"react-dom": "^19.3.1"
|
|
@@ -75,12 +80,13 @@
|
|
|
75
80
|
"next": "^16.4.2",
|
|
76
81
|
"react": "19.3.1",
|
|
77
82
|
"react-dom": "19.3.1",
|
|
78
|
-
"@rdx/
|
|
79
|
-
"@rdx
|
|
83
|
+
"@rdx/eslint-config": "1.0.0",
|
|
84
|
+
"@lexibase/rdx-ui": "1.1.0",
|
|
85
|
+
"@rdx/typescript-config": "1.0.0"
|
|
80
86
|
},
|
|
81
87
|
"scripts": {
|
|
82
|
-
"dev": "tsup src/index.ts src/runtime/index.tsx --format esm --dts --watch --external @lexibase/rdx-core --external @lexibase/rdx-types --external next --external react --external react-dom --external next-mdx-remote",
|
|
83
|
-
"build": "tsup src/index.ts src/runtime/index.tsx --format esm --dts --clean --external @lexibase/rdx-core --external @lexibase/rdx-types --external next --external react --external react-dom --external next-mdx-remote",
|
|
88
|
+
"dev": "tsup src/index.ts src/runtime/index.tsx --format esm --dts --watch --external @lexibase/rdx-core --external @lexibase/rdx-types --external @lexibase/rdx-ui --external next --external react --external react-dom --external next-mdx-remote",
|
|
89
|
+
"build": "tsup src/index.ts src/runtime/index.tsx --format esm --dts --clean --external @lexibase/rdx-core --external @lexibase/rdx-types --external @lexibase/rdx-ui --external next --external react --external react-dom --external next-mdx-remote",
|
|
84
90
|
"lint": "eslint . --max-warnings 0",
|
|
85
91
|
"check-types": "tsc --noEmit",
|
|
86
92
|
"test": "node --test tests/*.test.mjs",
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url'
|
|
2
2
|
|
|
3
|
-
import { getRdxTracingConfig } from '@lexibase/rdx-next/config'
|
|
3
|
+
import { getRdxBuildRoot, getRdxTracingConfig } from '@lexibase/rdx-next/config'
|
|
4
4
|
|
|
5
5
|
const rootDir = fileURLToPath(new URL('..', import.meta.url))
|
|
6
6
|
const appDir = fileURLToPath(new URL('.', import.meta.url))
|
|
7
|
+
const buildRoot = await getRdxBuildRoot(rootDir)
|
|
7
8
|
|
|
8
9
|
/** @type {import('next').NextConfig} */
|
|
9
10
|
const nextConfig = {
|
|
10
11
|
...(await getRdxTracingConfig({ rootDir, appDir })),
|
|
11
|
-
outputFileTracingRoot:
|
|
12
|
+
outputFileTracingRoot: buildRoot,
|
|
12
13
|
agentRules: false,
|
|
13
14
|
turbopack: {
|
|
14
|
-
root:
|
|
15
|
+
root: buildRoot,
|
|
15
16
|
},
|
|
16
17
|
transpilePackages: [
|
|
17
18
|
'@lexibase/rdx-core',
|