Skip to content

Commit

Permalink
Merge branch 'canary' into hrmny/update-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra authored Feb 1, 2024
2 parents f4ce526 + edb9371 commit 0893afa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
4 changes: 0 additions & 4 deletions packages/next/src/build/webpack-build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import origDebug from 'next/dist/compiled/debug'
import type { ChildProcess } from 'child_process'
import path from 'path'
import { exportTraceState, recordTraceEvents } from '../../trace'
import { needsExperimentalReact } from '../../lib/needs-experimental-react'

const debug = origDebug('next:build:webpack-build')

Expand Down Expand Up @@ -48,9 +47,6 @@ async function webpackBuildWithWorker(
env: {
...process.env,
NEXT_PRIVATE_BUILD_WORKER: '1',
NEXT_EXPERIMENTAL_REACT: JSON.stringify(
needsExperimentalReact(NextBuildContext.config!)
),
},
},
}) as Worker & typeof import('./impl')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
if (process.env.NEXT_RUNTIME === 'edge') {
module.exports = require('next/dist/server/future/route-modules/app-route/module.js')
} else {
if (process.env.NODE_ENV === 'development') {
module.exports = require('next/dist/compiled/next-server/app-route.runtime.dev.js')
} else if (process.env.TURBOPACK) {
module.exports = require('next/dist/compiled/next-server/app-route-turbo.runtime.prod.js')
if (process.env.__NEXT_EXPERIMENTAL_REACT) {
if (process.env.NODE_ENV === 'development') {
module.exports = require('next/dist/compiled/next-server/app-route-experimental.runtime.dev.js')
} else if (process.env.TURBOPACK) {
module.exports = require('next/dist/compiled/next-server/app-route-turbo-experimental.runtime.prod.js')
} else {
module.exports = require('next/dist/compiled/next-server/app-route-experimental.runtime.prod.js')
}
} else {
module.exports = require('next/dist/compiled/next-server/app-route.runtime.prod.js')
if (process.env.NODE_ENV === 'development') {
module.exports = require('next/dist/compiled/next-server/app-route.runtime.dev.js')
} else if (process.env.TURBOPACK) {
module.exports = require('next/dist/compiled/next-server/app-route-turbo.runtime.prod.js')
} else {
module.exports = require('next/dist/compiled/next-server/app-route.runtime.prod.js')
}
}
}

0 comments on commit 0893afa

Please sign in to comment.