@openworkers/adapter-sveltekit 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -7
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -63,7 +63,7 @@ export default function (options = {}) {
|
|
|
63
63
|
);
|
|
64
64
|
|
|
65
65
|
// Bundle main worker with esbuild
|
|
66
|
-
const workerDest = `${dest}/
|
|
66
|
+
const workerDest = `${dest}/_worker.js`;
|
|
67
67
|
const shimAsyncHooks = posixify(path.resolve(files, 'shims/async_hooks.js'));
|
|
68
68
|
|
|
69
69
|
await build({
|
|
@@ -130,7 +130,7 @@ export default function (options = {}) {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
// Generate
|
|
133
|
+
// Generate _routes.json for edge routing
|
|
134
134
|
const routes = {
|
|
135
135
|
// Immutable assets (hashed filenames, cache forever)
|
|
136
136
|
immutable: [`/${appPath}/immutable/*`],
|
|
@@ -145,14 +145,12 @@ export default function (options = {}) {
|
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
writeFileSync(
|
|
148
|
-
`${dest}/
|
|
149
|
-
|
|
150
|
-
`// Used by OpenWorkers edge router to bypass worker for static content\n\n` +
|
|
151
|
-
`export default ${JSON.stringify(routes, null, '\t')};\n`
|
|
148
|
+
`${dest}/_routes.json`,
|
|
149
|
+
JSON.stringify(routes, null, 2)
|
|
152
150
|
);
|
|
153
151
|
|
|
154
152
|
builder.log.minor(`Wrote ${workerDest}`);
|
|
155
|
-
builder.log.minor(`Wrote ${dest}/
|
|
153
|
+
builder.log.minor(`Wrote ${dest}/_routes.json`);
|
|
156
154
|
|
|
157
155
|
if (functions.length > 0) {
|
|
158
156
|
builder.log.minor(`Wrote ${functions.length} function workers to ${dest}/functions/`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openworkers/adapter-sveltekit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "SvelteKit adapter for OpenWorkers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adapter",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"format": "prettier --write ."
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"esbuild": "^0.
|
|
38
|
+
"esbuild": "^0.27.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@openworkers/workers-types": "^0.1.7",
|