Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions assets.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.sql' {
const content: string
export default content
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"scripts": {
"deploy": "wrangler deploy",
"deploy-with-ui": "pnpm run build && wrangler deploy",
"dev": "vite dev",
"dev": "pnpm run build && wrangler dev",
"build": "vite build --mode client && vite build",
"start": "wrangler dev",
"publish-npm-module": "npm publish --access public",
Expand Down
Empty file added src/sql/user.sql
Empty file.
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default defineConfig(({ mode }) => {

const entry = './src/index.ts'
return {
assetsInclude: ['**/*.sql'],
server: { port: 8787 },
plugins: [
devServer({ adapter: cloudflareAdapter, entry }),
Expand Down
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'vitest/config'

export default defineConfig({
assetsInclude: ['**/*.sql'],
test: {
coverage: {
provider: 'istanbul',
Expand Down
4 changes: 4 additions & 0 deletions wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ compatibility_flags = ["nodejs_compat_v2"]

assets = { directory = "./public/" }

rules = [
{ type = "Text", globs = ["**/*.sql"], fallthrough = true }
]

# Service Bindings
## DO NOT REMOVE: TEMPLATE SERVICES ##

Expand Down
Loading