Skip to content

Commit f271fa0

Browse files
authored
Fix output standalone for alternative bundler (#76971)
1. fix output standalone for alternative bundler 2. update rspack to a newer version
1 parent 5df8025 commit f271fa0

File tree

5 files changed

+67
-85
lines changed

5 files changed

+67
-85
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"@next/third-parties": "workspace:*",
110110
"@opentelemetry/api": "1.4.1",
111111
"@picocss/pico": "1.5.10",
112-
"@rspack/core": "npm:@rspack-canary/[email protected].0-canary-37cc738d-20250207113050",
112+
"@rspack/core": "npm:@rspack-canary/[email protected].9-canary-c009cfc1-20250313053424",
113113
"@rspack/plugin-react-refresh": "1.0.1",
114114
"@svgr/webpack": "5.5.0",
115115
"@swc/cli": "0.1.55",

packages/next-plugin-rspack/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"directory": "packages/next-plugin-rspack"
77
},
88
"dependencies": {
9-
"@rspack/core": "npm:@rspack-canary/[email protected].0-canary-37cc738d-20250207113050",
9+
"@rspack/core": "npm:@rspack-canary/[email protected].9-canary-c009cfc1-20250313053424",
1010
"@rspack/plugin-react-refresh": "1.0.1"
1111
}
1212
}

packages/next/src/build/webpack/plugins/next-trace-entrypoints-plugin.ts

+3-20
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance {
186186
for (const entrypoint of compilation.entrypoints.values()) {
187187
const entryFiles = new Set<string>()
188188

189-
for (const chunk of process.env.NEXT_RSPACK
190-
? entrypoint.chunks
191-
: entrypoint.getEntrypointChunk().getAllReferencedChunks()) {
189+
for (const chunk of entrypoint
190+
.getEntrypointChunk()
191+
.getAllReferencedChunks()) {
192192
for (const file of chunk.files) {
193193
if (isTraceable(file)) {
194194
const filePath = nodePath.join(outputPath, file)
@@ -582,23 +582,6 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance {
582582
'next-trace-entrypoint-plugin'
583583
)
584584

585-
compilation.hooks.processAssets.tapAsync(
586-
{
587-
name: PLUGIN_NAME,
588-
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE,
589-
},
590-
(_assets: any, callback: any) => {
591-
this.createTraceAssets(compilation, traceEntrypointsPluginSpan)
592-
.then(() => callback())
593-
.catch((err) => callback(err))
594-
}
595-
)
596-
597-
// rspack doesn't support all API below so only create trace assets
598-
if (process.env.NEXT_RSPACK) {
599-
return
600-
}
601-
602585
const readlink = async (path: string): Promise<string | null> => {
603586
try {
604587
return await new Promise((resolve, reject) => {

packages/next/src/compiled/sass-loader/cjs.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)