Unverified Commit 8b60fbc7 authored by Steven's avatar Steven Committed by GitHub

fix: webpack target should match node engines (#51852)

The webpack `target` was outdated so I updated to match `engines`. See related https://github.com/vercel/next.js/pull/48941
parent 0732f2f5
......@@ -14,9 +14,8 @@ export const base = curry(function base(
: COMPILER_NAMES.server
: COMPILER_NAMES.client
// @ts-ignore TODO webpack 5 typings
config.target = !ctx.targetWeb
? 'node12.22'
? 'node16.8' // Same version defined in packages/next/package.json#engines
: ctx.isEdgeRuntime
? ['web', 'es6']
: ['web', 'es5']
......
......@@ -70,7 +70,7 @@ module.exports = function (task) {
},
env: {
targets: {
// Follows version defined in packages/next/package.json#engine
// Same version defined in packages/next/package.json#engines
// Currently a few minors behind due to babel class transpiling
node: '16.8.0',
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment