Import SQL files as additional modules by default
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";Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2026 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark
-