Skip to content

Commit 625a2c0

Browse files
committed
fix: changes from review
1 parent af78226 commit 625a2c0

File tree

4 files changed

+10080
-5
lines changed

4 files changed

+10080
-5
lines changed

helpers/verifyBuildTarget.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ const verifyBuildTarget = async ({ failBuild }) => {
3939
// Creating a config file, because otherwise Next won't reload the config and pick up the new target
4040

4141
if (!(await findUp('next.config.js'))) {
42-
await writeFile(path.resolve('next.config.js'), `module.exports = {}`)
42+
await writeFile(
43+
path.resolve('next.config.js'),
44+
`module.exports = {
45+
// Supported targets are "serverless" and "experimental-serverless-trace"
46+
target: "serverless"
47+
}`,
48+
)
4349
}
4450
// Force the new config to be generated
4551
await getNextConfig(failBuild)

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const copyUnstableIncludedDirs = require('./helpers/copyUnstableIncludedDirs')
55
const doesNotNeedPlugin = require('./helpers/doesNotNeedPlugin')
66
const getNextConfig = require('./helpers/getNextConfig')
77
const validateNextUsage = require('./helpers/validateNextUsage')
8-
const nextOnNetlify = require('./src')
98
const verifyBuildTarget = require('./helpers/verifyBuildTarget')
9+
const nextOnNetlify = require('./src')
1010

1111
// * Helpful Plugin Context *
1212
// - Between the prebuild and build steps, the project's build command is run

0 commit comments

Comments
 (0)