<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Cloudfront on qko@coffee:~$</title>
		<link>https://qko.coffee/tags/cloudfront/</link>
		<description>Recent content in Cloudfront on qko@coffee:~$</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<lastBuildDate>Wed, 02 Dec 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://qko.coffee/tags/cloudfront/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Pull request previews with S3 and CloudFront</title>
				<link>https://qko.coffee/articles/pull-request-previews-cloudfront/</link>
				<pubDate>Wed, 02 Dec 2026 00:00:00 +0000</pubDate>
				<guid>https://qko.coffee/articles/pull-request-previews-cloudfront/</guid>
				<description>&lt;p&gt;A shared environment shows one version of the frontend at a time. To try several changes in parallel, before they are merged, each pull request needs its own copy of the frontend.&lt;/p&gt;&#xA;&lt;p&gt;That copy does not have to be a full environment. A SPA is only static files, so a copy is just another folder. The infrastructure stays the same for every PR, only the files change.&lt;/p&gt;&#xA;&lt;p&gt;No cost or moving parts are added per PR, and there is no limit on the number of previews.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Runtime configuration with Vite and CloudFront</title>
				<link>https://qko.coffee/articles/runtime-configuration-vite-cloudfront/</link>
				<pubDate>Mon, 16 Mar 2026 00:00:00 +0000</pubDate>
				<guid>https://qko.coffee/articles/runtime-configuration-vite-cloudfront/</guid>
				<description>&lt;p&gt;Vite handles environment variables through &lt;code&gt;.env&lt;/code&gt; files.&lt;/p&gt;&#xA;&lt;p&gt;During development, it loads &lt;code&gt;.env.development&lt;/code&gt; and resolves &lt;code&gt;import.meta.env.VITE_*&lt;/code&gt; references on the fly through its development server.&lt;/p&gt;&#xA;&lt;p&gt;During build, it reads &lt;code&gt;.env.production&lt;/code&gt; and inlines the values directly into the output bundle, replacing every &lt;code&gt;import.meta.env.VITE_*&lt;/code&gt; with the corresponding hardcoded string.&lt;/p&gt;&#xA;&lt;p&gt;This means one artifact per environment. This breaks the build-once-deploy-everywhere principle. The fix is to move configuration injection from build time to runtime, so a single artifact can serve any environment.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
