Skip to content

Commit 276b948

Browse files
committed
refactor: remove build command temporarily
1 parent c55e77d commit 276b948

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

demos/default/netlify.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build]
22
command = "next build"
33
publish = ".next"
4-
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
54

65
[build.environment]
76
# cache Cypress binary in local "node_modules" folder

packages/runtime/src/helpers/functions.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const generatePagesResolver = async ({
5757

5858
// Move our next/image function into the correct functions directory
5959
export const setupImageFunction = async ({
60-
constants: { INTERNAL_FUNCTIONS_SRC, FUNCTIONS_SRC = DEFAULT_FUNCTIONS_SRC },
60+
constants: { INTERNAL_FUNCTIONS_SRC, FUNCTIONS_SRC = DEFAULT_FUNCTIONS_SRC, IS_LOCAL },
6161
imageconfig = {},
6262
netlifyConfig,
6363
basePath,
@@ -72,11 +72,12 @@ export const setupImageFunction = async ({
7272
responseHeaders?: Record<string, string>
7373
}): Promise<void> => {
7474
const imagePath = imageconfig.path || '/_next/image'
75-
75+
console.log('DISABLE?', process.env.DISABLE_IPX)
76+
7677
if (isEnvSet('DISABLE_IPX')) {
7778
// If no image loader is specified, need to redirect to a 404 page since there's no
78-
// backing loader to serve local site images
79-
if (imageconfig.loader && imageconfig.loader === 'default') {
79+
// backing loader to serve local site images once deployed to Netlify
80+
if (!IS_LOCAL && imageconfig.loader && imageconfig.loader === 'default') {
8081
netlifyConfig.redirects.push({
8182
from: `${imagePath}*`,
8283
query: { url: ':url', w: ':width', q: ':quality' },

0 commit comments

Comments
 (0)