Skip to content
Merged
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
5 changes: 4 additions & 1 deletion pkg/runtime/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ func (w *Runtime) Build(ctx context.Context, input *runtime.BuildInput) (*runtim
if err != nil {
return nil, err
}
// Windows paths must not be embedded raw in JS string literals: backslashes
// are escape sequences (\p, \f, etc.). Forward slashes work for imports.
importPath := filepath.ToSlash(abs)
target := filepath.Join(input.Out(), input.Handler)

slog.Info("loader info", "loader", build.Loader)
Expand Down Expand Up @@ -108,7 +111,7 @@ func (w *Runtime) Build(ctx context.Context, input *runtime.BuildInput) (*runtim
import { fromCloudflareEnv, wrapCloudflareHandler } from "sst/resource/cloudflare"
export * from "%s"
export default wrapCloudflareHandler(handler)
`, abs, abs),
`, importPath, importPath),
ResolveDir: filepath.Dir(abs),
Loader: esbuild.LoaderTS,
},
Expand Down
Loading