Skip to content

Commit

Permalink
[fix] use posix to resolve relative path (#3214)
Browse files Browse the repository at this point in the history
* cloudflare posix relative

* add changeset
  • Loading branch information
ignatiusmb authored Jan 5, 2022
1 parent e3f52d3 commit 0f6196f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-news-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-cloudflare': patch
---

use posix to resolve relative path
4 changes: 2 additions & 2 deletions packages/adapter-cloudflare/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { writeFileSync } from 'fs';
import { relative } from 'path';
import { posix } from 'path';
import { fileURLToPath } from 'url';
import * as esbuild from 'esbuild';

Expand All @@ -21,7 +21,7 @@ export default function (options = {}) {

const { paths } = await builder.prerender({ dest });

const relativePath = relative(tmp, builder.getServerDirectory());
const relativePath = posix.relative(tmp, builder.getServerDirectory());

writeFileSync(
`${tmp}/manifest.js`,
Expand Down

0 comments on commit 0f6196f

Please sign in to comment.