diff --git a/.all-contributorsrc b/.all-contributorsrc index 4a8fcae..fd6b555 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -3,9 +3,7 @@ "projectOwner": "OpenSourceRaidGuild", "repoType": "github", "repoHost": "https://github.com", - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "commit": false, "commitConvention": "none", @@ -15,57 +13,51 @@ "name": "Michael Peyper", "avatar_url": "https://avatars.githubusercontent.com/u/23029903?v=4", "profile": "https://github.com/mpeyper", - "contributions": [ - "code", - "test", - "doc" - ] + "contributions": ["code", "test", "doc"] }, { "login": "nobrayner", "name": "Braydon Hall", "avatar_url": "https://avatars.githubusercontent.com/u/40751395?v=4", "profile": "https://github.com/nobrayner", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "MohitPopli", "name": "Mohit", "avatar_url": "https://avatars.githubusercontent.com/u/17976072?v=4", "profile": "https://github.com/MohitPopli", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "rubenmoya", "name": "Rubén Moya", "avatar_url": "https://avatars.githubusercontent.com/u/905225?v=4", "profile": "https://rubenmoya.dev/", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "mitchelvanbever", "name": "Mitchel van Bever", "avatar_url": "https://avatars.githubusercontent.com/u/10127707?v=4", "profile": "https://github.com/mitchelvanbever", - "contributions": [ - "ideas" - ] + "contributions": ["ideas"] }, { "login": "vctqs1", "name": "vctqs1", "avatar_url": "https://avatars.githubusercontent.com/u/30227910?v=4", "profile": "https://github.com/vctqs1", - "contributions": [ - "code" - ] + "contributions": ["code"] + }, + { + "login": "DesselBane", + "name": "DesselBane", + "avatar_url": "https://avatars.githubusercontent.com/u/12199480?v=4", + "profile": "https://github.com/DesselBane", + "contributions": ["code"] } ], "contributorsPerLine": 8 } + diff --git a/README.md b/README.md index 85c587d..ed2f93b 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Mohit
Mohit

💻 Rubén Moya
Rubén Moya

💻 Mitchel van Bever
Mitchel van Bever

🤔 - vctqs1
vctqs1

💻 📖 + vctqs1
vctqs1

💻 + DesselBane
DesselBane

💻 diff --git a/packages/babel-plugin-transform-vite-meta-glob/src/index.ts b/packages/babel-plugin-transform-vite-meta-glob/src/index.ts index 93c0209..cdecac6 100644 --- a/packages/babel-plugin-transform-vite-meta-glob/src/index.ts +++ b/packages/babel-plugin-transform-vite-meta-glob/src/index.ts @@ -42,7 +42,9 @@ export default function viteMetaGlobBabelPlugin({ t.isStringLiteral(args[0]) ) { const cwd = nodePath.dirname(sourceFile) - const globPaths = globSync(args[0].value, { cwd, dotRelative: true }).sort() + const globPaths = globSync(args[0].value, { cwd, dotRelative: true }) + .sort() + .map((globPath) => globPath.replace(/\\/g, '/')) const replacement = t.objectExpression( globPaths.map((globPath) => @@ -85,7 +87,9 @@ export default function viteMetaGlobBabelPlugin({ t.isBooleanLiteral(eagerOption[0].value) ) { const cwd = nodePath.dirname(sourceFile) - const globPaths = globSync(args[0].value, { cwd, dotRelative: true }).sort() + const globPaths = globSync(args[0].value, { cwd, dotRelative: true }) + .sort() + .map((globPath) => globPath.replace(/\\/g, '/')) if (eagerOption[0].value.value) { const identifiers = globPaths.map((_, idx) => t.identifier(`__glob__0_${idx}`)) @@ -97,7 +101,7 @@ export default function viteMetaGlobBabelPlugin({ identifiers[idx], t.callExpression(t.identifier('require'), [modulePath]) ) - ]); + ]) }) const variable = t.variableDeclaration('const', [