Skip to content

Commit 28f43b1

Browse files
committed
fix: resolve cross-platform path resolution in vite.config.ts
1 parent 640fb62 commit 28f43b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const writeIndexHTML = () => {
99
const examplePaths = globSync("packages/**/src/**/example.html");
1010
for (const examplePath of examplePaths) {
1111
const directory = path.dirname(examplePath);
12-
const packageNameMatch = directory.match(/packages\\([^\\]+)/);
12+
const packageNameMatch = directory.match(/packages[\\\/]([^\\\/]+)/);
1313
if (!(packageNameMatch && packageNameMatch.length > 1)) continue;
1414
const packageName = packageNameMatch[1];
1515
const exampleName = path.basename(directory);

0 commit comments

Comments
 (0)