releases.shpreview
Cloudflare/Cloudflare Changelog/Workers - Import SQL files as additional modules by default

Workers - Import SQL files as additional modules by default

$npx -y @buildinternet/releases show rel_YG27tf4pCPFSZw0L2OX1i

The .sql file extension is now automatically configured to be importable in your Worker code when using Wrangler or the Cloudflare Vite plugin. This is particular useful for importing migrations in Durable Objects and means you no longer need to configure custom rules when using Drizzle. SQL files are imported as JavaScript strings: // example will be a JavaScript stringimport example from "./example.sql";

Fetched April 4, 2026