Skip to content

Commit 09642bd

Browse files
committed
fix: changes from review
1 parent 630cb1a commit 09642bd

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Diff for: index.js

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ module.exports = {
3030
// Populates the correct config if needed
3131
await verifyBuildTarget({ netlifyConfig, packageJson, failBuild })
3232

33-
// Because we memoize nextConfig, we need to do this after the write file
3433
const nextConfig = await getNextConfig(utils.failBuild)
3534

3635
if (nextConfig.images.domains.length !== 0 && !process.env.NEXT_IMAGE_ALLOWED_DOMAINS) {

Diff for: test/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const useFixture = async function (fixtureName) {
4949
// In each test, we change cwd to a temporary directory.
5050
// This allows us not to have to mock filesystem operations.
5151
beforeEach(async () => {
52+
// This is so we can test the target setting code
5253
delete process.env.NEXT_PRIVATE_TARGET
5354
delete require.cache[require.resolve('next/dist/telemetry/ci-info')]
5455
delete require.cache[require.resolve('next/dist/next-server/server/config')]
@@ -85,15 +86,13 @@ describe('preBuild()', () => {
8586
})
8687

8788
test('run plugin if the app has next export in an unused script', async () => {
88-
process.env.hi = 'ok'
8989
await plugin.onPreBuild({
9090
netlifyConfig,
9191
packageJson: { ...DUMMY_PACKAGE_JSON, scripts: { export: 'next export' } },
9292
utils,
9393
constants: {},
9494
})
9595
expect(process.env.NEXT_PRIVATE_TARGET).toBe('serverless')
96-
// expect(await pathExists('next.config.js')).toBeTruthy()
9796
})
9897

9998
test('do nothing if app has static html export in toml/ntl config', async () => {

0 commit comments

Comments
 (0)