-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add default Text module rule for .sql files
#11738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 2998908 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Claude finished @jamesopstad's task —— View job Changeset Review
The changeset needs improvement in the following area: Changelog Quality: The changeset description should include a usage example for this new feature. According to the guidelines, "For new features or significant changes, include a brief usage example. This helps users understand how to use the new functionality." Consider adding an example like: Add default `Text` module rule for `.sql` files
This enables importing `.sql` files directly in Wrangler and the Cloudflare Vite plugin without extra configuration.
You can now import SQL files directly:
```ts
import schema from './schema.sql';
console.log(schema); // SQL file contents as a string
```
Previously, this required adding a custom module rule in your configuration.What's correct: |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
3957d47 to
2998908
Compare
* Add failing fixture * Add default SQL rule to Wrangler * Add failing Vite playground test * Add default SQL rule to Vite plugin * Add changeset * Update snapshot
Fixes #9011
Add default
Textmodule rule for.sqlfiles.This enables importing
.sqlfiles directly in Wrangler and the Cloudflare Vite plugin without extra configuration.Note: this will remove the need to add a custom rule here so I will open a PR to update the Drizzle docs once this is released.
A picture of a cute animal (not mandatory, but encouraged)