Skip to content

Commit edec675

Browse files
DesselBaneJan Morawietz
andauthored
fix: replace backslash with forward slash on windows (#53)
Co-authored-by: Jan Morawietz <[email protected]>
1 parent 2b58d5e commit edec675

File tree

3 files changed

+24
-27
lines changed

3 files changed

+24
-27
lines changed

.all-contributorsrc

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"projectOwner": "OpenSourceRaidGuild",
44
"repoType": "github",
55
"repoHost": "https://github.com",
6-
"files": [
7-
"README.md"
8-
],
6+
"files": ["README.md"],
97
"imageSize": 100,
108
"commit": false,
119
"commitConvention": "none",
@@ -15,57 +13,51 @@
1513
"name": "Michael Peyper",
1614
"avatar_url": "https://avatars.githubusercontent.com/u/23029903?v=4",
1715
"profile": "https://github.com/mpeyper",
18-
"contributions": [
19-
"code",
20-
"test",
21-
"doc"
22-
]
16+
"contributions": ["code", "test", "doc"]
2317
},
2418
{
2519
"login": "nobrayner",
2620
"name": "Braydon Hall",
2721
"avatar_url": "https://avatars.githubusercontent.com/u/40751395?v=4",
2822
"profile": "https://github.com/nobrayner",
29-
"contributions": [
30-
"code"
31-
]
23+
"contributions": ["code"]
3224
},
3325
{
3426
"login": "MohitPopli",
3527
"name": "Mohit",
3628
"avatar_url": "https://avatars.githubusercontent.com/u/17976072?v=4",
3729
"profile": "https://github.com/MohitPopli",
38-
"contributions": [
39-
"code"
40-
]
30+
"contributions": ["code"]
4131
},
4232
{
4333
"login": "rubenmoya",
4434
"name": "Rubén Moya",
4535
"avatar_url": "https://avatars.githubusercontent.com/u/905225?v=4",
4636
"profile": "https://rubenmoya.dev/",
47-
"contributions": [
48-
"code"
49-
]
37+
"contributions": ["code"]
5038
},
5139
{
5240
"login": "mitchelvanbever",
5341
"name": "Mitchel van Bever",
5442
"avatar_url": "https://avatars.githubusercontent.com/u/10127707?v=4",
5543
"profile": "https://github.com/mitchelvanbever",
56-
"contributions": [
57-
"ideas"
58-
]
44+
"contributions": ["ideas"]
5945
},
6046
{
6147
"login": "vctqs1",
6248
"name": "vctqs1",
6349
"avatar_url": "https://avatars.githubusercontent.com/u/30227910?v=4",
6450
"profile": "https://github.com/vctqs1",
65-
"contributions": [
66-
"code"
67-
]
51+
"contributions": ["code"]
52+
},
53+
{
54+
"login": "DesselBane",
55+
"name": "DesselBane",
56+
"avatar_url": "https://avatars.githubusercontent.com/u/12199480?v=4",
57+
"profile": "https://github.com/DesselBane",
58+
"contributions": ["code"]
6859
}
6960
],
7061
"contributorsPerLine": 8
7162
}
63+

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
4343
<td align="center" valign="top" width="12.5%"><a href="https://github.com/MohitPopli"><img src="https://avatars.githubusercontent.com/u/17976072?v=4?s=100" width="100px;" alt="Mohit"/><br /><sub><b>Mohit</b></sub></a><br /><a href="https://github.com/OpenSourceRaidGuild/babel-vite/commits?author=MohitPopli" title="Code">💻</a></td>
4444
<td align="center" valign="top" width="12.5%"><a href="https://rubenmoya.dev/"><img src="https://avatars.githubusercontent.com/u/905225?v=4?s=100" width="100px;" alt="Rubén Moya"/><br /><sub><b>Rubén Moya</b></sub></a><br /><a href="https://github.com/OpenSourceRaidGuild/babel-vite/commits?author=rubenmoya" title="Code">💻</a></td>
4545
<td align="center" valign="top" width="12.5%"><a href="https://github.com/mitchelvanbever"><img src="https://avatars.githubusercontent.com/u/10127707?v=4?s=100" width="100px;" alt="Mitchel van Bever"/><br /><sub><b>Mitchel van Bever</b></sub></a><br /><a href="#ideas-mitchelvanbever" title="Ideas, Planning, & Feedback">🤔</a></td>
46-
<td align="center" valign="top" width="12.5%"><a href="https://github.com/vctqs1"><img src="https://avatars.githubusercontent.com/u/30227910?v=4?s=100" width="100px;" alt="vctqs1"/><br /><sub><b>vctqs1</b></sub></a><br /><a href="https://github.com/OpenSourceRaidGuild/babel-vite/commits?author=vctqs1" title="Code">💻</a> <a href="https://github.com/OpenSourceRaidGuild/babel-vite/commits?author=vctqs1" title="Documentation">📖</a></td>
46+
<td align="center" valign="top" width="12.5%"><a href="https://github.com/vctqs1"><img src="https://avatars.githubusercontent.com/u/30227910?v=4?s=100" width="100px;" alt="vctqs1"/><br /><sub><b>vctqs1</b></sub></a><br /><a href="https://github.com/OpenSourceRaidGuild/babel-vite/commits?author=vctqs1" title="Code">💻</a></td>
47+
<td align="center" valign="top" width="12.5%"><a href="https://github.com/DesselBane"><img src="https://avatars.githubusercontent.com/u/12199480?v=4?s=100" width="100px;" alt="DesselBane"/><br /><sub><b>DesselBane</b></sub></a><br /><a href="https://github.com/OpenSourceRaidGuild/babel-vite/commits?author=DesselBane" title="Code">💻</a></td>
4748
</tr>
4849
</tbody>
4950
</table>

packages/babel-plugin-transform-vite-meta-glob/src/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ export default function viteMetaGlobBabelPlugin({
4242
t.isStringLiteral(args[0])
4343
) {
4444
const cwd = nodePath.dirname(sourceFile)
45-
const globPaths = globSync(args[0].value, { cwd, dotRelative: true }).sort()
45+
const globPaths = globSync(args[0].value, { cwd, dotRelative: true })
46+
.sort()
47+
.map((globPath) => globPath.replace(/\\/g, '/'))
4648

4749
const replacement = t.objectExpression(
4850
globPaths.map((globPath) =>
@@ -85,7 +87,9 @@ export default function viteMetaGlobBabelPlugin({
8587
t.isBooleanLiteral(eagerOption[0].value)
8688
) {
8789
const cwd = nodePath.dirname(sourceFile)
88-
const globPaths = globSync(args[0].value, { cwd, dotRelative: true }).sort()
90+
const globPaths = globSync(args[0].value, { cwd, dotRelative: true })
91+
.sort()
92+
.map((globPath) => globPath.replace(/\\/g, '/'))
8993

9094
if (eagerOption[0].value.value) {
9195
const identifiers = globPaths.map((_, idx) => t.identifier(`__glob__0_${idx}`))
@@ -97,7 +101,7 @@ export default function viteMetaGlobBabelPlugin({
97101
identifiers[idx],
98102
t.callExpression(t.identifier('require'), [modulePath])
99103
)
100-
]);
104+
])
101105
})
102106

103107
const variable = t.variableDeclaration('const', [

0 commit comments

Comments
 (0)