这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
auto-install-peers = true
hoist-pattern[]=vfile-message
hoist-pattern[]=next-rspack
Copy link
Author

@hardfist hardfist Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next-rspack is a phantom dependency of next, so need this trick to make it work to support successfully resolve to next-rspack in next

hoist-pattern[]=@rspack/core
resolution-mode=highest
dedupe-direct-deps=true
6 changes: 5 additions & 1 deletion docs/site/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createMDX } from "fumadocs-mdx/next";
import withRspack from "next-rspack";
import { withVercelToolbar } from "@vercel/toolbar/plugins/next";
import { REDIRECTS_FOR_V2_DOCS } from "./lib/redirects/v2-docs.mjs";

Expand Down Expand Up @@ -165,4 +166,7 @@ const config = {

// @ts-expect-error -- Not sure what's up here but not worth spending time on.
// eslint-disable-next-line import/no-default-export
export default withMDX(vercelToolbar(config));
const nextConfig = withMDX(vercelToolbar(config));
export default process.env.NEXT_RSPACK == "true"
? withRspack(nextConfig)
: nextConfig;
7 changes: 5 additions & 2 deletions docs/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"description": "The documentation for Turborepo.",
"scripts": {
"build": "next build",
"build:rspack": "NEXT_RSPACK=true next build",
"check-spelling": "spellchecker --files '**/*.mdx' --files '!content/blog/*.mdx' --files '!content/docs/acknowledgments.mdx' --files '!node_modules/**' --files '!content/extra/terms.mdx' --files '!content/extra/governance.mdx' --files '!content/extra/privacy.mdx' --dictionaries 'dictionary.txt' --no-suggestions --quiet",
"dev": "next dev",
"dev:rspack": "NEXT_RSPACK=true next dev",
"eslint": "fumadocs-mdx && eslint .",
"eslint:fix": "fumadocs-mdx && eslint . --fix",
"index-docs": "tsx ./scripts/sync-algolia.mjs",
Expand Down Expand Up @@ -46,7 +48,7 @@
"fumadocs-ui": "^14.7.7",
"geist": "^1.3.0",
"lucide-react": "^0.479.0",
"next": "15.2.2",
"next": "15.3.0",
"next-themes": "^0.4.6",
"react": "19.0.0",
"react-dom": "19.0.0",
Expand Down Expand Up @@ -80,7 +82,8 @@
"spellchecker-cli": "^6.2.0",
"tailwindcss": "^3.4.1",
"tsx": "^4.6.2",
"typescript": "5.6.3"
"typescript": "5.6.3",
"next-rspack": "15.3.0"
},
"engines": {
"node": "20.x"
Expand Down
28 changes: 28 additions & 0 deletions docs/site/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,39 @@
"generate-openapi"
]
},
"build:rspack": {
"env": [
"NEXT_PUBLIC_ALGOLIA_INDEX",
"TURBOREPO_SFDC_CAMPAIGN_ID",
"CONVERT_KIT_FORM_ID",
"TINYBIRD_TIME_SAVED_TOKEN",
"ENABLE_EXPERIMENTAL_COREPACK",
"TRAY_URL",
"BLOB_READ_WRITE_TOKEN",
"FLAGS_SECRET"
],
"inputs": ["$TURBO_DEFAULT$", "content/**"],
"outputs": [".next/**", "!.next/cache/**"],
"dependsOn": [
"^build",
"rss",
"schema",
"write-private-files",
"collect-examples-data",
"generate-openapi"
]
},
"dev": {
"dependsOn": ["schema", "collect-examples-data", "generate-openapi"],
"persistent": true,
"cache": false
},
"dev:rspack": {
"dependsOn": ["schema", "collect-examples-data", "generate-openapi"],
"persistent": true,
"cache": false
},

"schema": {
"dependsOn": ["@turbo/types#build"],
"inputs": ["scripts/copy-json-schema.mjs"],
Expand Down
Loading
Loading