Skip to content

Commit ed04ed3

Browse files
fix vite plugin not working in projects which path contains a non-ascii character (#10774)
1 parent 0c208e1 commit ed04ed3

File tree

18 files changed

+14
-4
lines changed

18 files changed

+14
-4
lines changed

.changeset/every-ants-wash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudflare/vite-plugin": patch
3+
---
4+
5+
fix vite plugin not working projects which path contains a non-ascii character

packages/vite-plugin-cloudflare/playground/vitest-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ beforeAll(async (s) => {
8888
const suite = s as RunnerTestFile;
8989

9090
testPath = suite.filepath!;
91-
testName = slash(testPath).match(/playground\/([\w-]+)\//)?.[1]!;
91+
testName = slash(testPath).match(/playground\/([\w-]+)\//)?.[1]!;
9292
testDir = path.dirname(testPath);
9393
if (testName) {
9494
testDir = path.resolve(workspaceRoot, "playground", testName);

packages/vite-plugin-cloudflare/playground/worker/__tests__/worker.spec.ts renamed to packages/vite-plugin-cloudflare/playground/worker-♫/__tests__/worker.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ test("basic hello-world functionality", async () => {
1717
);
1818
});
1919

20+
test("the project path can contain a non-ascii character", async () => {
21+
// For context see https://github.com/cloudflare/workers-sdk/issues/10717
22+
expect(rootDir).toContain("♫");
23+
});
24+
2025
test("preserves entry signatures", async () => {
2126
expect(serverLogs.info.join()).toContain("__preserves-entry-signatures__");
2227
});

0 commit comments

Comments
 (0)