You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mThe entrypoint index.ts has exports like an ES Module, but hasn't defined a default export like a module worker normally would. Building the worker using \\"service-worker\\" format...[0m
116
116
117
117
"
118
118
`);
119
119
});
120
+
121
+
it("should list exports",async()=>{
122
+
awaitwriteFile(
123
+
"./index.ts",
124
+
"export default {}; export const Hello ='world'"
125
+
);
126
+
// Note that this isn't actually a valid worker, because it's missing
127
+
// a fetch handler. Regardless, our heuristic is simply to check for exports.
@@ -28,7 +28,7 @@ export default async function guessWorkerFormat(
28
28
entryFile
29
29
)} defines a Python worker, support for Python workers is currently experimental. Python workers with a requirements.txt file can only be run locally and cannot be deployed.`
30
30
);
31
-
return"modules";
31
+
return{format: "modules",exports: []};
32
32
}
33
33
34
34
constresult=awaitesbuild.build({
@@ -77,5 +77,5 @@ export default async function guessWorkerFormat(
0 commit comments