Skip to content
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

feat(remix-dev): import .sql files as text #3190

Merged
merged 3 commits into from
Aug 3, 2022
Merged

feat(remix-dev): import .sql files as text #3190

merged 3 commits into from
Aug 3, 2022

Conversation

jacob-ebey
Copy link
Member

Adds the ability to import .sql files as text. This is useful when writing raw SQL instead of using an ORM.

@MichaelDeBoey MichaelDeBoey changed the title feat: import .sql files as text feat(remix-dev): import .sql files as text May 14, 2022
@@ -22,6 +22,7 @@ export const loaders: { [ext: string]: esbuild.Loader } = {
".ogg": "file",
".otf": "file",
".png": "file",
".sql": "text",
Copy link
Member

@sergiodxa sergiodxa May 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
".sql": "text",
".sql": "text",
".gql": "text",

What do you think about also adding .gql as text? That will let people import a .gql file with a GraphQL query/mutation/subscription and then use it as a variable directly in their code

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do a separate PR for that.

@changeset-bot
Copy link

changeset-bot bot commented Aug 3, 2022

🦋 Changeset detected

Latest commit: 93afee6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@remix-run/dev Patch
create-remix Patch
remix Patch
@remix-run/eslint-config Patch
@remix-run/react Patch
@remix-run/serve Patch
@remix-run/server-runtime Patch
@remix-run/cloudflare Patch
@remix-run/node Patch
@remix-run/deno Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
@remix-run/express Patch
@remix-run/netlify Patch
@remix-run/vercel Patch
@remix-run/architect Patch

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants