Skip to content

Commit d34e48f

Browse files
committed
Fix default worker created with base64 data URI instead of script content
Use ?raw import suffix for .txt files so Vite returns the file content as a string instead of a data URI.
1 parent f4bb70b commit d34e48f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openworkers-api",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"license": "MIT",
55
"type": "module",
66
"repository": {

src/routes/api/v1/workers/+server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import type { RequestHandler } from './$types';
33
import { workersService } from '$lib/services/workers';
44
import { WorkerCreateInputSchema, WorkerSchema } from '$lib/types';
55
import { jsonResponse, jsonArrayResponse, parseAndValidate } from '$lib/server/validate';
6-
import defaultWorkerJs from '../../../../../examples/default-worker-js.txt';
7-
import defaultWorkerTs from '../../../../../examples/default-worker-ts.txt';
6+
import defaultWorkerJs from '../../../../../examples/default-worker-js.txt?raw';
7+
import defaultWorkerTs from '../../../../../examples/default-worker-ts.txt?raw';
88

99
// GET /api/v1/workers - List all workers for current user
1010
export const GET: RequestHandler = async ({ locals }) => {

0 commit comments

Comments
 (0)