From 94f54f34261f16304c6c17385f3b2647b18dbe8f Mon Sep 17 00:00:00 2001 From: Jarrett Lusso Date: Tue, 2 Jan 2024 00:10:50 -0500 Subject: [PATCH] Update Netlify configuration (#824) - CSS and JS path are incorrect - `NETLIFY_IMAGES_CDN_DOMAIN` doesn't appear to exist anymore and isn't documented (https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables) - Netlify removed all post processing besides `pretty_urls` --- .../configurations/netlify/netlify.sh | 5 ++--- .../configurations/netlify/netlify.toml | 13 +------------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/bridgetown-core/lib/bridgetown-core/configurations/netlify/netlify.sh b/bridgetown-core/lib/bridgetown-core/configurations/netlify/netlify.sh index 349589f36..229fa0367 100755 --- a/bridgetown-core/lib/bridgetown-core/configurations/netlify/netlify.sh +++ b/bridgetown-core/lib/bridgetown-core/configurations/netlify/netlify.sh @@ -3,12 +3,11 @@ echo "Updating netlify.toml with references to our built files" -CSS_PATH=`find output/_bridgetown/static/css/*.css -type f | sed -e 's,output\/,/,g'` -JS_PATH=`find output/_bridgetown/static/js/*.js -type f | sed -e 's,output\/,/,g'` +CSS_PATH=`find output/_bridgetown/static/*.css -type f | sed -e 's,output\/,/,g'` +JS_PATH=`find output/_bridgetown/static/*.js -type f | sed -e 's,output\/,/,g'` echo "CSS Path: ${CSS_PATH}" echo "JS Path: ${JS_PATH}" sed -i s,CSS_PATH,${CSS_PATH},g netlify.toml sed -i s,JS_PATH,${JS_PATH},g netlify.toml -sed -i s,NETLIFY_IMAGES_CDN_DOMAIN,${NETLIFY_IMAGES_CDN_DOMAIN},g netlify.toml diff --git a/bridgetown-core/lib/bridgetown-core/configurations/netlify/netlify.toml b/bridgetown-core/lib/bridgetown-core/configurations/netlify/netlify.toml index 04e9e062c..f83d157bc 100644 --- a/bridgetown-core/lib/bridgetown-core/configurations/netlify/netlify.toml +++ b/bridgetown-core/lib/bridgetown-core/configurations/netlify/netlify.toml @@ -6,18 +6,8 @@ NODE_ENV = "development" BRIDGETOWN_ENV = "production" -[build.processing] - skip_processing = false -[build.processing.css] - bundle = false - minify = true -[build.processing.js] - bundle = false - minify = true [build.processing.html] pretty_urls = true -[build.processing.images] - compress = true [[headers]] for = "*" @@ -34,8 +24,7 @@ [headers.values] Link = [ "; rel=preload; as=style", - "; rel=preload; as=script", - "; rel=preconnect" + "; rel=preload; as=script" ] [[headers]]